mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 03:33:58 -05:00
MediaUploadDto: Make noteId optional
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
2e5d40432e
commit
73997d4693
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