restore: bulk actions (#3730)

* feat: improve bulk isArchive and isFavorite updates

* chore: open api
This commit is contained in:
Jason Rasmussen
2023-08-16 16:04:55 -04:00
committed by GitHub
parent 8568ec838a
commit bab739efbd
30 changed files with 734 additions and 57 deletions

View File

@@ -129,6 +129,10 @@ export class AssetRepository implements IAssetRepository {
});
}
async updateAll(ids: string[], options: Partial<AssetEntity>): Promise<void> {
await this.repository.update({ id: In(ids) }, options);
}
async save(asset: Partial<AssetEntity>): Promise<AssetEntity> {
const { id } = await this.repository.save(asset);
return this.repository.findOneOrFail({