refresh token arreglado

This commit is contained in:
2025-10-06 10:31:20 -04:00
parent e2105ccbf5
commit 6f8a55b8fd
3 changed files with 10 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
// auth.controllers
// api/src/feacture/auth/auth.controller.ts
import { Public } from '@/common/decorators';
import { JwtRefreshGuard } from '@/common/guards/jwt-refresh.guard';
import { RefreshTokenDto } from '@/features/auth/dto/refresh-token.dto';
@@ -57,19 +57,11 @@ export class AuthController {
@HttpCode(200)
@Patch('refresh')
//@RequirePermissions('auth:refresh-token')
async refreshToken(@Req() req: Request,@Body() refreshTokenDto: RefreshTokenDto) {
async refreshToken(@Body() refreshTokenDto: any) {
// console.log("Pepeeeee");
// console.log(req['user']);
// console.log("refreshTokenDto",refreshTokenDto);
// console.log(typeof refreshTokenDto);
const data = await this.authService.refreshToken(refreshTokenDto);
// console.log("data",data);
if (!data) {
return null;
}
if (!data) return null;
return {tokens: data}
}