refresh token arreglado
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user