diff --git a/src/media/media-upload.dto.ts b/src/media/media-upload.dto.ts index d0d96eb73..690617009 100644 --- a/src/media/media-upload.dto.ts +++ b/src/media/media-upload.dto.ts @@ -19,13 +19,13 @@ export class MediaUploadDto extends BaseDto { url: string; /** - * The noteId of the note to which the uploaded file is linked to. + * The publicId of the note to which the uploaded file is linked to. * @example "noteId" TODO how looks a note id? */ @IsString() @IsOptional() @ApiProperty() - noteId: string | null; + notePublicId: string | null; /** * The date when the upload objects was created. diff --git a/src/media/media.service.ts b/src/media/media.service.ts index 812f2e8af..81aef875b 100644 --- a/src/media/media.service.ts +++ b/src/media/media.service.ts @@ -225,7 +225,7 @@ export class MediaService { async toMediaUploadDto(mediaUpload: MediaUpload): Promise { return { url: mediaUpload.fileUrl, - noteId: (await mediaUpload.note)?.id ?? null, + notePublicId: (await mediaUpload.note)?.publicId ?? null, createdAt: mediaUpload.createdAt, username: (await mediaUpload.user).username, };