fix: ts compilation errors in auth

This commit is contained in:
Hamza-Ayed
2026-07-16 16:05:28 +03:00
parent 83f2d0854a
commit 4f11580d4a
7 changed files with 68 additions and 2 deletions
@@ -1,6 +1,8 @@
import { Controller, Post, Body, Headers, UnauthorizedException } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { AuthService } from './auth.service';
@ApiTags('auth')
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
@@ -23,4 +25,10 @@ export class AuthController {
if (!tenantId) throw new UnauthorizedException('Tenant ID (x-tenant-id) is required');
return this.authService.verifyOtp(tenantId, phone, code);
}
@Post('refresh')
async refresh(@Body('refresh_token') refreshToken: string) {
if (!refreshToken) throw new UnauthorizedException('refresh_token is required');
return this.authService.refresh(refreshToken);
}
}