refactor(media-upload): lazy-load relations

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-11-18 18:47:12 +01:00
parent 4d57105853
commit 296d73c121
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
9 changed files with 39 additions and 30 deletions

View file

@ -131,7 +131,7 @@ export class MediaController {
const mediaUpload = await this.mediaService.findUploadByFilename(
filename,
);
if (mediaUpload.user.username !== username) {
if ((await mediaUpload.user).username !== username) {
this.logger.warn(
`${username} tried to delete '${filename}', but is not the owner`,
'deleteMedia',