mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -05:00
MediaUploadDto: Make noteId optional
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
b518583fd2
commit
64f9a29f02
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ export class MediaUploadDto {
|
|||
@IsString()
|
||||
@IsOptional()
|
||||
@ApiProperty()
|
||||
noteId?: string;
|
||||
noteId: string | null;
|
||||
|
||||
/**
|
||||
* The date when the upload objects was created.
|
||||
|
|
|
@ -227,7 +227,7 @@ export class MediaService {
|
|||
toMediaUploadDto(mediaUpload: MediaUpload): MediaUploadDto {
|
||||
return {
|
||||
url: mediaUpload.fileUrl,
|
||||
noteId: mediaUpload.note?.id,
|
||||
noteId: mediaUpload.note?.id ?? null,
|
||||
createdAt: mediaUpload.createdAt,
|
||||
userName: mediaUpload.user.userName,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue