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:
Matthias Rupp 2022-10-28 21:54:09 +02:00 committed by GitHub
parent 443c842723
commit ea99567805
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 314 additions and 30 deletions

View file

@ -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({