1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-16 03:40:33 +02:00

chore(web): generate API functions with a single argument (#2568)

This commit is contained in:
Sergey Kondrikov
2023-05-28 04:52:22 +03:00
committed by GitHub
parent a460940430
commit 6c6c5ef651
65 changed files with 1913 additions and 491 deletions

View File

@ -60,22 +60,26 @@
try {
if (shareType === SharedLinkType.Album && album) {
const { data } = await api.albumApi.createAlbumSharedLink({
albumId: album.id,
expiresAt: expirationDate,
allowUpload: isAllowUpload,
description: description,
allowDownload: isAllowDownload,
showExif: shouldShowExif
createAlbumShareLinkDto: {
albumId: album.id,
expiresAt: expirationDate,
allowUpload: isAllowUpload,
description: description,
allowDownload: isAllowDownload,
showExif: shouldShowExif
}
});
buildSharedLink(data);
} else {
const { data } = await api.assetApi.createAssetsSharedLink({
assetIds: sharedAssets.map((a) => a.id),
expiresAt: expirationDate,
allowUpload: isAllowUpload,
description: description,
allowDownload: isAllowDownload,
showExif: shouldShowExif
createAssetsShareLinkDto: {
assetIds: sharedAssets.map((a) => a.id),
expiresAt: expirationDate,
allowUpload: isAllowUpload,
description: description,
allowDownload: isAllowDownload,
showExif: shouldShowExif
}
});
buildSharedLink(data);
}
@ -133,12 +137,15 @@
? new Date(currentTime + expirationTime).toISOString()
: null;
await api.shareApi.editSharedLink(editingLink.id, {
description,
expiresAt: shouldChangeExpirationTime ? expirationDate : undefined,
allowUpload: isAllowUpload,
allowDownload: isAllowDownload,
showExif: shouldShowExif
await api.shareApi.editSharedLink({
id: editingLink.id,
editSharedLinkDto: {
description,
expiresAt: shouldChangeExpirationTime ? expirationDate : undefined,
allowUpload: isAllowUpload,
allowDownload: isAllowDownload,
showExif: shouldShowExif
}
});
notificationController.show({