mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
fix(public/notes-controller): extract canEdit parameter from body
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
976e5671fa
commit
ebb8b10804
1 changed files with 3 additions and 3 deletions
|
@ -268,7 +268,7 @@ export class NotesController {
|
|||
@RequestUser() user: User,
|
||||
@RequestNote() note: Note,
|
||||
@Param('userName') username: string,
|
||||
@Body() canEdit: boolean,
|
||||
@Body('canEdit') canEdit: boolean,
|
||||
): Promise<NotePermissionsDto> {
|
||||
const permissionUser = await this.userService.getUserByUsername(username);
|
||||
const returnedNote = await this.permissionService.setUserPermission(
|
||||
|
@ -321,7 +321,7 @@ export class NotesController {
|
|||
@OpenApi(
|
||||
{
|
||||
code: 200,
|
||||
description: 'Set the permissions for a user on a note',
|
||||
description: 'Set the permissions for a group on a note',
|
||||
dto: NotePermissionsDto,
|
||||
},
|
||||
403,
|
||||
|
@ -331,7 +331,7 @@ export class NotesController {
|
|||
@RequestUser() user: User,
|
||||
@RequestNote() note: Note,
|
||||
@Param('groupName') groupName: string,
|
||||
@Body() canEdit: boolean,
|
||||
@Body('canEdit') canEdit: boolean,
|
||||
): Promise<NotePermissionsDto> {
|
||||
const permissionGroup = await this.groupService.getGroupByName(groupName);
|
||||
const returnedNote = await this.permissionService.setGroupPermission(
|
||||
|
|
Loading…
Reference in a new issue