From 96c79637825bdda32642c5b09d17aa3fe1b43689 Mon Sep 17 00:00:00 2001 From: Zorin Sergey <36981278+Enhed@users.noreply.github.com> Date: Tue, 29 Jun 2021 16:22:47 +0300 Subject: [PATCH] Add limit options for deleteMany files (#6561) * Changed filesize to bigint for large files * Update api/src/database/migrations/20210626A-change-filesize-bigint.ts * add `limit -1` for deleteMany files options from #6560 Co-authored-by: Rijk van Zanten --- api/src/services/files.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/services/files.ts b/api/src/services/files.ts index 25f7664389..9b9bdc6780 100644 --- a/api/src/services/files.ts +++ b/api/src/services/files.ts @@ -190,7 +190,7 @@ export class FilesService extends ItemsService { * Delete multiple files */ async deleteMany(keys: PrimaryKey[], opts?: MutationOptions): Promise { - const files = await super.readMany(keys, { fields: ['id', 'storage'] }); + const files = await super.readMany(keys, { fields: ['id', 'storage'], limit: -1 }); if (!files) { throw new ForbiddenException();