Skip to content

Commit

Permalink
perf(backend): use packMany instead of mapping to pack
Browse files Browse the repository at this point in the history
  • Loading branch information
zyoshoka committed May 30, 2024
1 parent 5f918d3 commit f72992f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
folderId: ps.folderId ?? IsNull(),
});

return await Promise.all(files.map(file => this.driveFileEntityService.pack(file, { self: true })));
return await this.driveFileEntityService.packMany(files, { self: true });
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-

const reactions = await query.limit(ps.limit).getMany();

return await Promise.all(reactions.map(reaction => this.noteReactionEntityService.pack(reaction, me)));
return await this.noteReactionEntityService.packMany(reactions, me);
});
}
}

0 comments on commit f72992f

Please sign in to comment.