Skip to content

Commit

Permalink
fix: user patch body
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Garifullin committed Apr 19, 2023
1 parent cad87d6 commit a6e2dce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"options": {
"shell": {
"args": [
"${workspaceFolder}/misc/env/dev-local.env"
"${workspaceFolder}/prod.env"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions misc/api.http
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@host = http://localhost:8080
#@host = https://hdapp.ruslang.xyz
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjc4ODEzMzEyLCJleHAiOjE2Nzg4OTk3MTJ9.on6JPfnuTvktLTGbPFvOzvUorHdgSsObSOZQio4_EXo
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzcsImlhdCI6MTY4MTkyNjIwNiwiZXhwIjoxNjgyMDEyNjA2fQ.jT5GD1yS1xj2JBickUpHKLoNcaJZpn5QrnzTwG9Lh84

POST {{host}}/api/auth/login HTTP/1.1
Content-Type: application/json
Expand Down Expand Up @@ -98,7 +98,7 @@ Authorization: Bearer {{token}}

####

PATCH {{host}}/api/users/1 HTTP/1.1
PATCH {{host}}/api/users/by_id/11 HTTP/1.1
Authorization: Bearer {{token}}
Content-Type: application/json

Expand Down
2 changes: 1 addition & 1 deletion packages/js/web2/backend/src/api/users/users.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class UsersController {
@ApiOperation({ description: "Update information on a user by ID." })
@ApiBearerAuth()
async updateUserById(@Param("id") id: string,
@Body("data", new IoTsValidationPipe(UpdateUserDto)) data: UpdateUserDto,
@Body(new IoTsValidationPipe(UpdateUserDto)) data: UpdateUserDto,
): Promise<UserDto> {
try {
const updateData = UserAdapter.transformUpdateDtoToEntity(data);
Expand Down

0 comments on commit a6e2dce

Please sign in to comment.