mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
fix(media-upload): remove backendData parameter
`Create` methods should only contain optional properties Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
3fe1bb0edf
commit
04412826a7
2 changed files with 2 additions and 3 deletions
|
@ -68,7 +68,6 @@ export class MediaUpload {
|
|||
user: User,
|
||||
extension: string,
|
||||
backendType: BackendType,
|
||||
backendData: BackendData | null,
|
||||
fileUrl: string,
|
||||
): Omit<MediaUpload, 'createdAt'> {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -99,9 +99,9 @@ export class MediaService {
|
|||
user,
|
||||
fileTypeResult.ext,
|
||||
this.mediaBackendType,
|
||||
backendData,
|
||||
url,
|
||||
);
|
||||
mediaUpload.backendData = backendData;
|
||||
await this.mediaUploadRepository.save(mediaUpload);
|
||||
return url;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue