Skip to content

Commit

Permalink
feature/change-users-roles-and-permissions: changed post method to patch
Browse files Browse the repository at this point in the history
  • Loading branch information
BEdev24 committed Dec 2, 2024
1 parent 38ec06a commit 3822df3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/postman/CC Portal develop.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
{
"name": "Change user role and permissions",
"request": {
"method": "POST",
"method": "PATCH",
"header": [
{
"key": "Authorization",
Expand Down
3 changes: 1 addition & 2 deletions backend/src/users/api/users.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Request,
Delete,
BadRequestException,
Post,
} from '@nestjs/common';
import { UsersFacade } from '../facade/users.facade';
import { UpdateUserRequest } from './request/update-user.request';
Expand Down Expand Up @@ -332,7 +331,7 @@ export class UsersController {
@ApiResponse({ status: 404, description: 'Not Found' })
@ApiResponse({ status: 500, description: 'Internal server error' })
@HttpCode(200)
@Post(':id/role-permissions')
@Patch(':id/role-permissions')
@Permissions(PermissionEnum.MANAGE_ROLES_AND_PERMISSIONS)
@UseGuards(JwtAuthGuard, UserPathGuard, PermissionGuard)
async updateUserRoleAndPermissions(
Expand Down

0 comments on commit 3822df3

Please sign in to comment.