From 04412826a7dca067c1653113f25b8c6157e3bb89 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 14 Nov 2021 21:14:03 +0100 Subject: [PATCH] fix(media-upload): remove backendData parameter `Create` methods should only contain optional properties Signed-off-by: David Mehren --- src/media/media-upload.entity.ts | 3 +-- src/media/media.service.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/media/media-upload.entity.ts b/src/media/media-upload.entity.ts index a396fb9f5..7a6d71e13 100644 --- a/src/media/media-upload.entity.ts +++ b/src/media/media-upload.entity.ts @@ -68,7 +68,6 @@ export class MediaUpload { user: User, extension: string, backendType: BackendType, - backendData: BackendData | null, fileUrl: string, ): Omit { const upload = new MediaUpload(); @@ -76,7 +75,7 @@ export class MediaUpload { upload.note = note; upload.user = user; upload.backendType = backendType; - upload.backendData = backendData; + upload.backendData = null; upload.fileUrl = fileUrl; return upload; } diff --git a/src/media/media.service.ts b/src/media/media.service.ts index 20d00c4cc..df8004aca 100644 --- a/src/media/media.service.ts +++ b/src/media/media.service.ts @@ -99,9 +99,9 @@ export class MediaService { user, fileTypeResult.ext, this.mediaBackendType, - backendData, url, ); + mediaUpload.backendData = backendData; await this.mediaUploadRepository.save(mediaUpload); return url; }