be
This commit is contained in:
14
backend/src/users/users.controller.ts
Executable file
14
backend/src/users/users.controller.ts
Executable file
@@ -0,0 +1,14 @@
|
||||
import { Body, Controller, Patch, Request } from '@nestjs/common';
|
||||
import { UsersService } from './users.service';
|
||||
import { ChangePasswordDto } from './dto/change-password.dto';
|
||||
|
||||
@Controller('users')
|
||||
export class UsersController {
|
||||
constructor(private readonly userService: UsersService) {}
|
||||
|
||||
@Patch('password')
|
||||
async changePassword(@Request() req, @Body() dto: ChangePasswordDto) {
|
||||
console.log("dd");
|
||||
return await this.userService.changePassword(req.user.userId, dto);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user