Skip to content

Commit 717792a

Browse files
committed
Remove unnecessary promise
1 parent 3d6ec37 commit 717792a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/controllers/Files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Files implements FilesController {
2929
public async list(params: { ids: ID[] }, user: User = null): Promise<FilesController.GetFileResponse[]> {
3030
const files = await this.fileRepository.find({ ...params, user });
3131

32-
const filesWithLocation = await Promise.all(files.map(async (file) => {
32+
const filesWithLocation = files.map((file) => {
3333
const location = this.cdn.getSignedUrl(file.path);
3434
const thumbnails = file.thumbnails.map(path => this.cdn.getUrl(path));
3535
const conversions = 'conversions' in file ? file.conversions.map(c => this.cdn.getUrl(c)) : undefined;
@@ -40,7 +40,7 @@ class Files implements FilesController {
4040
thumbnails,
4141
conversions,
4242
};
43-
}));
43+
});
4444

4545
return filesWithLocation;
4646
}

0 commit comments

Comments
 (0)