mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
NotesController: Add PUT :noteIdOrAlias/metadata
route
Signed-off-by: David Mehren <git@herrmehren.de> Co-authored-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
08fd070bcb
commit
67cd8cb0f6
1 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,7 @@ import {
|
|||
Put,
|
||||
} from '@nestjs/common';
|
||||
import { ConsoleLoggerService } from '../../../logger/console-logger.service';
|
||||
import { NoteMetadataUpdateDto } from '../../../notes/note-metadata.dto';
|
||||
import { NotePermissionsUpdateDto } from '../../../notes/note-permissions.dto';
|
||||
import { NotesService } from '../../../notes/notes.service';
|
||||
import { RevisionsService } from '../../../revisions/revisions.service';
|
||||
|
@ -72,6 +73,14 @@ export class NotesController {
|
|||
return this.noteService.getNoteMetadata(noteIdOrAlias);
|
||||
}
|
||||
|
||||
@Put(':noteIdOrAlias/metadata')
|
||||
updateNoteMetadata(
|
||||
@Param('noteIdOrAlias') noteIdOrAlias: string,
|
||||
@Body() updateDto: NoteMetadataUpdateDto,
|
||||
) {
|
||||
return this.noteService.updateNoteMetadata(noteIdOrAlias, updateDto);
|
||||
}
|
||||
|
||||
@Put(':noteIdOrAlias/permissions')
|
||||
updateNotePermissions(
|
||||
@Param('noteIdOrAlias') noteIdOrAlias: string,
|
||||
|
|
Loading…
Reference in a new issue