preiiter, eslint

This commit is contained in:
2025-07-18 17:48:12 +09:00
parent 036a220276
commit ffba4bdf09
154 changed files with 397 additions and 14485 deletions

View File

@@ -3,15 +3,19 @@ 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';
import { AuthRequest } from 'src/common/interfaces/auth-request.interface';
@Controller('users')
export class UsersController {
constructor(private readonly userService: UsersService) {}
constructor(private readonly userService: UsersService) {}
@UseGuards(JwtAuthGuard)
@Patch('password')
async changePassword(@Request() req, @Body() dto: ChangePasswordDto): Promise<SuccessResponseDto> {
await this.userService.changePassword(req.user.userId, dto);
return SuccessResponseDto.ok();
}
@UseGuards(JwtAuthGuard)
@Patch('password')
async changePassword(
@Request() req: AuthRequest,
@Body() dto: ChangePasswordDto,
): Promise<SuccessResponseDto> {
await this.userService.changePassword(req.user.userId, dto);
return SuccessResponseDto.ok();
}
}