fix eslint errors
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 1m8s

This commit is contained in:
unurled 2025-02-07 20:24:16 +01:00
parent b4eb949a3e
commit 418a9e2c7a
Signed by: unurled
GPG key ID: EFC5F5E709B47DDD
17 changed files with 105 additions and 78 deletions

View file

@ -1,7 +1,8 @@
import { Controller, Get, Req, UseGuards } from '@nestjs/common';
import { Controller, Get, UseGuards } from '@nestjs/common';
import { JwtAuthGuard } from '../../common/modules/auth/guards/jwt-auth.guard';
import { UserEntity } from '../../common/modules/auth/models/entities/user.entity';
import { ApiBearerAuth } from '@nestjs/swagger';
import { User } from 'src/common/modules/auth/decorators/user.decorator';
@Controller('users')
export class UsersController {
@ -10,7 +11,7 @@ export class UsersController {
@Get('me')
@UseGuards(JwtAuthGuard)
@ApiBearerAuth()
getMyself(@Req() req: any): UserEntity {
return req.user;
getMyself(@User() user: UserEntity): UserEntity {
return user;
}
}