mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-08 18:39:08 +00:00
FEAT: new route for updating Roles and changed hierarchy to string
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
Get,
|
||||
Inject,
|
||||
Param,
|
||||
Patch,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
@@ -22,6 +23,7 @@ import {
|
||||
GetRolesByCustomerRes,
|
||||
UnassignPermissionsToRoleReq,
|
||||
UnassignPermissionsToRoleRes,
|
||||
UpdateRoleReq,
|
||||
} from './dto/entities';
|
||||
|
||||
@ApiTags('Roles')
|
||||
@@ -72,4 +74,13 @@ export class RolesController {
|
||||
) {
|
||||
this.logger.info('unassignPermissionsToRole', { user });
|
||||
}
|
||||
@Patch(':id')
|
||||
@ApiResponse({ type: UpdateRoleRes })
|
||||
async updateRole(
|
||||
@User() user,
|
||||
@Param('id') id: string,
|
||||
@Body() body: UpdateRoleReq,
|
||||
) {
|
||||
this.logger.info('updateRole', { user });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user