feat: add jwt auth guard and profile endpoint

This commit is contained in:
2026-02-28 08:14:04 +03:30
parent 8212ede785
commit 06f659101d
21 changed files with 371 additions and 31 deletions
+3
View File
@@ -2,6 +2,7 @@ import { Body, Controller, HttpCode, Post } from '@nestjs/common';
import { LoginDTO } from './dtos/login.dto';
import { AuthService } from './providers/auth.service';
import { VerifyOtpDTO } from './dtos/verify-otp.dto';
import { Public } from './decorators/public.decorator';
@Controller('users')
export class AuthController {
@@ -12,12 +13,14 @@ export class AuthController {
private readonly authService: AuthService,
) {}
@Public()
@Post('login')
@HttpCode(200)
public async logIn(@Body() loginDto: LoginDTO) {
return await this.authService.logIn(loginDto);
}
@Public()
@Post('verify-otp')
@HttpCode(200)
public async verifyOTP(@Body() verifyOtpDto: VerifyOtpDTO) {