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 <rijkvanzanten@me.com>
This commit is contained in:
Zorin Sergey
2021-06-29 16:22:47 +03:00
committed by rijkvanzanten
parent 6116b627f4
commit 96c7963782

View File

@@ -190,7 +190,7 @@ export class FilesService extends ItemsService {
* Delete multiple files
*/
async deleteMany(keys: PrimaryKey[], opts?: MutationOptions): Promise<PrimaryKey[]> {
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();