format + lint

This commit is contained in:
2025-06-14 14:12:18 +08:00
parent e777afc433
commit 90a67b681e
69 changed files with 1756 additions and 1583 deletions

View File

@@ -6,25 +6,21 @@ import { AuthService } from 'src/auth/auth.service';
@Controller('user')
export class UserController {
constructor(
private readonly userService: UserService,
private readonly authService: AuthService,
) {}
constructor(
private readonly userService: UserService,
private readonly authService: AuthService,
) { }
@UseGuards(AuthGuard('jwt'))
@Get('me')
async getMe(@Request() req) {
const { user } = req;
return this.userService.findOne({ userId: user.userId });
}
@UseGuards(AuthGuard('jwt'))
@Get('me')
async getMe(@Request() req) {
const { user } = req;
return this.userService.findOne({ userId: user.userId });
}
@UseGuards(AuthGuard('jwt'))
@Put('password')
async update(
@Request() req,
@Body() dto: UpdateUserPasswordDto,
) {
return this.userService.setPassword(req.user.userId, dto.password);
}
@UseGuards(AuthGuard('jwt'))
@Put('password')
async update(@Request() req, @Body() dto: UpdateUserPasswordDto) {
return this.userService.setPassword(req.user.userId, dto.password);
}
}