This commit is contained in:
2025-07-18 15:02:46 +09:00
parent bf8c75f770
commit 766a2ad111
37 changed files with 1284 additions and 943 deletions

View File

@@ -1,15 +1,17 @@
import { Body, Controller, Patch, Request } from '@nestjs/common';
import { Body, Controller, Patch, Request, UseGuards } from '@nestjs/common';
import { UsersService } from './users.service';
import { ChangePasswordDto } from './dto/change-password.dto';
import { JwtAuthGuard } from 'src/auth/jwt-auth.guard';
import { SuccessResponseDto } from 'src/common/dto/sucees-response.dto';
@Controller('users')
export class UsersController {
constructor(private readonly userService: UsersService) {}
@UseGuards(JwtAuthGuard)
@Patch('password')
async changePassword(@Request() req, @Body() dto: ChangePasswordDto) {
console.log("dd");
async changePassword(@Request() req, @Body() dto: ChangePasswordDto): Promise<SuccessResponseDto> {
await this.userService.changePassword(req.user.userId, dto);
return
return SuccessResponseDto.ok();
}
}