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.
tryFullStack/backend/src/users/users.controller.ts

16 lines
528 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");
2 months ago
await this.userService.changePassword(req.user.userId, dto);
return
2 months ago
}
}