mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 17:56:30 -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()
|
@IsString()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
noteId?: string;
|
noteId: string | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date when the upload objects was created.
|
* The date when the upload objects was created.
|
||||||
|
|
|
@ -227,7 +227,7 @@ export class MediaService {
|
||||||
toMediaUploadDto(mediaUpload: MediaUpload): MediaUploadDto {
|
toMediaUploadDto(mediaUpload: MediaUpload): MediaUploadDto {
|
||||||
return {
|
return {
|
||||||
url: mediaUpload.fileUrl,
|
url: mediaUpload.fileUrl,
|
||||||
noteId: mediaUpload.note?.id,
|
noteId: mediaUpload.note?.id ?? null,
|
||||||
createdAt: mediaUpload.createdAt,
|
createdAt: mediaUpload.createdAt,
|
||||||
userName: mediaUpload.user.userName,
|
userName: mediaUpload.user.userName,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue