mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -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,
|
@RequestUser() user: User,
|
||||||
@RequestNote() note: Note,
|
@RequestNote() note: Note,
|
||||||
@Param('userName') username: string,
|
@Param('userName') username: string,
|
||||||
@Body() canEdit: boolean,
|
@Body('canEdit') canEdit: boolean,
|
||||||
): Promise<NotePermissionsDto> {
|
): Promise<NotePermissionsDto> {
|
||||||
const permissionUser = await this.userService.getUserByUsername(username);
|
const permissionUser = await this.userService.getUserByUsername(username);
|
||||||
const returnedNote = await this.permissionService.setUserPermission(
|
const returnedNote = await this.permissionService.setUserPermission(
|
||||||
|
@ -321,7 +321,7 @@ export class NotesController {
|
||||||
@OpenApi(
|
@OpenApi(
|
||||||
{
|
{
|
||||||
code: 200,
|
code: 200,
|
||||||
description: 'Set the permissions for a user on a note',
|
description: 'Set the permissions for a group on a note',
|
||||||
dto: NotePermissionsDto,
|
dto: NotePermissionsDto,
|
||||||
},
|
},
|
||||||
403,
|
403,
|
||||||
|
@ -331,7 +331,7 @@ export class NotesController {
|
||||||
@RequestUser() user: User,
|
@RequestUser() user: User,
|
||||||
@RequestNote() note: Note,
|
@RequestNote() note: Note,
|
||||||
@Param('groupName') groupName: string,
|
@Param('groupName') groupName: string,
|
||||||
@Body() canEdit: boolean,
|
@Body('canEdit') canEdit: boolean,
|
||||||
): Promise<NotePermissionsDto> {
|
): Promise<NotePermissionsDto> {
|
||||||
const permissionGroup = await this.groupService.getGroupByName(groupName);
|
const permissionGroup = await this.groupService.getGroupByName(groupName);
|
||||||
const returnedNote = await this.permissionService.setGroupPermission(
|
const returnedNote = await this.permissionService.setGroupPermission(
|
||||||
|
|
Loading…
Reference in a new issue