Better error handling and documentation on refresh token

This commit is contained in:
Gabriel Rosa
2023-02-14 09:25:14 -03:00
parent de06512249
commit c5c089e5d5
6 changed files with 63 additions and 29 deletions
+8 -1
View File
@@ -13,7 +13,12 @@ import {
Req,
Param,
} from '@nestjs/common';
import { ApiHeaders, ApiSecurity, ApiTags } from '@nestjs/swagger';
import {
ApiHeaders,
ApiOkResponse,
ApiSecurity,
ApiTags,
} from '@nestjs/swagger';
import {
AuthChangePasswordRequest,
AuthResetPasswordRequest,
@@ -35,6 +40,7 @@ import { GrpcToHttpExceptionFilter } from '../../error/grpc-to-http-exception.fi
import { RequestUser, User } from 'src/decorators/user.decorator';
import {
AuthRefreshAccessTokenReq,
AuthRefreshAccessTokenRes,
AuthSignInReq,
AuthSignInRes,
} from './dtos/login';
@@ -101,6 +107,7 @@ export class AuthController {
@Post('refresh-access-token')
@HttpCode(HttpStatus.OK)
@ApiOkResponse({ type: AuthRefreshAccessTokenRes })
async refreshAccessToken(
@Body() body: AuthRefreshAccessTokenReq,
@Language() language: LanguageEnum,