mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26: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,
|
user: User,
|
||||||
extension: string,
|
extension: string,
|
||||||
backendType: BackendType,
|
backendType: BackendType,
|
||||||
backendData: BackendData | null,
|
|
||||||
fileUrl: string,
|
fileUrl: string,
|
||||||
): Omit<MediaUpload, 'createdAt'> {
|
): Omit<MediaUpload, 'createdAt'> {
|
||||||
const upload = new MediaUpload();
|
const upload = new MediaUpload();
|
||||||
|
@ -76,7 +75,7 @@ export class MediaUpload {
|
||||||
upload.note = note;
|
upload.note = note;
|
||||||
upload.user = user;
|
upload.user = user;
|
||||||
upload.backendType = backendType;
|
upload.backendType = backendType;
|
||||||
upload.backendData = backendData;
|
upload.backendData = null;
|
||||||
upload.fileUrl = fileUrl;
|
upload.fileUrl = fileUrl;
|
||||||
return upload;
|
return upload;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,9 +99,9 @@ export class MediaService {
|
||||||
user,
|
user,
|
||||||
fileTypeResult.ext,
|
fileTypeResult.ext,
|
||||||
this.mediaBackendType,
|
this.mediaBackendType,
|
||||||
backendData,
|
|
||||||
url,
|
url,
|
||||||
);
|
);
|
||||||
|
mediaUpload.backendData = backendData;
|
||||||
await this.mediaUploadRepository.save(mediaUpload);
|
await this.mediaUploadRepository.save(mediaUpload);
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue