mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: album remove asset bug (#10687)
* fix: album remove asset bug * trigger GH Action --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
6ebae3c84f
commit
24c1855899
7 changed files with 44 additions and 46 deletions
|
|
@ -70,7 +70,7 @@ export class MemoryService {
|
|||
await this.access.requirePermission(auth, Permission.MEMORY_READ, id);
|
||||
|
||||
const repos = { accessRepository: this.accessRepository, repository: this.repository };
|
||||
const results = await addAssets(auth, repos, { id, assetIds: dto.ids });
|
||||
const results = await addAssets(auth, repos, { parentId: id, assetIds: dto.ids });
|
||||
|
||||
const hasSuccess = results.find(({ success }) => success);
|
||||
if (hasSuccess) {
|
||||
|
|
@ -84,8 +84,11 @@ export class MemoryService {
|
|||
await this.access.requirePermission(auth, Permission.MEMORY_WRITE, id);
|
||||
|
||||
const repos = { accessRepository: this.accessRepository, repository: this.repository };
|
||||
const permissions = [Permission.ASSET_SHARE];
|
||||
const results = await removeAssets(auth, repos, { id, assetIds: dto.ids, permissions });
|
||||
const results = await removeAssets(auth, repos, {
|
||||
parentId: id,
|
||||
assetIds: dto.ids,
|
||||
canAlwaysRemove: Permission.MEMORY_DELETE,
|
||||
});
|
||||
|
||||
const hasSuccess = results.find(({ success }) => success);
|
||||
if (hasSuccess) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue