fix: ts compilation errors in auth
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user