mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -04:00
refactor(api/private/media): return MediaUpload object instead of url
This ensures the private POST /media API behaves in the same way as /me/media Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
4f10e17d40
commit
8e31f3a393
10 changed files with 50 additions and 43 deletions
|
@ -88,8 +88,8 @@ export class MediaController {
|
|||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${user.username}'`,
|
||||
'uploadMedia',
|
||||
);
|
||||
const url = await this.mediaService.saveFile(file.buffer, user, note);
|
||||
return this.mediaService.toMediaUploadUrlDto(url);
|
||||
const upload = await this.mediaService.saveFile(file.buffer, user, note);
|
||||
return this.mediaService.toMediaUploadUrlDto(upload.fileUrl);
|
||||
}
|
||||
|
||||
@Delete(':filename')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue