mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server) Extend PUT /album/:id/assets endpoint (#857)
* Add new query parameter to API endpoint that allows adding assets to albums which potentially contain assets that are already part of this album. * Change API endpoint * Generate new APIs * Fixed test Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
443c842723
commit
ea99567805
18 changed files with 314 additions and 30 deletions
|
|
@ -215,8 +215,10 @@
|
|||
const { data } = await api.albumApi.addAssetsToAlbum(album.id, {
|
||||
assetIds: assets.map((a) => a.id)
|
||||
});
|
||||
album = data;
|
||||
|
||||
if (data.album) {
|
||||
album = data.album;
|
||||
}
|
||||
isShowAssetSelection = false;
|
||||
} catch (e) {
|
||||
console.error('Error [createAlbumHandler] ', e);
|
||||
|
|
@ -233,7 +235,10 @@
|
|||
const { data } = await api.albumApi.addAssetsToAlbum(album.id, {
|
||||
assetIds: assetIds
|
||||
});
|
||||
album = data;
|
||||
|
||||
if (data.album) {
|
||||
album = data.album;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error [assetUploadedToAlbumHandler] ', e);
|
||||
notificationController.show({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue