You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
518 B
15 lines
518 B
2 months ago
|
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);
|
||
|
}
|
||
|
}
|