feat: add refresh token and global exception filter

This commit is contained in:
2026-05-09 09:00:25 +03:30
parent 06f659101d
commit 73f7af3146
32 changed files with 512 additions and 42 deletions
+9 -1
View File
@@ -3,8 +3,9 @@ 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';
import { RefreshTokenDTO } from './dtos/refresh-token.dto';
@Controller('users')
@Controller('auth')
export class AuthController {
constructor(
/**
@@ -26,4 +27,11 @@ export class AuthController {
public async verifyOTP(@Body() verifyOtpDto: VerifyOtpDTO) {
return await this.authService.verifyOTP(verifyOtpDto);
}
@Public()
@Post('refresh')
@HttpCode(200)
public async refreshToken(@Body() refreshTokenDto: RefreshTokenDTO) {
return await this.authService.refreshToken(refreshTokenDto);
}
}