diff --git a/src/controllers/AuthController.ts b/src/controllers/AuthController.ts index d14e574..2264ba5 100644 --- a/src/controllers/AuthController.ts +++ b/src/controllers/AuthController.ts @@ -1,6 +1,6 @@ import { Body, JsonController, Post } from 'routing-controllers'; import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; -import { InvalidCredentialsError, PasswordNeededError, UsernameOrEmailNeededError } from '../errors/AuthError'; +import { IllegalJWTError, InvalidCredentialsError, JwtNotProvidedError, PasswordNeededError, RefreshTokenCountInvalidError, UsernameOrEmailNeededError } from '../errors/AuthError'; import { UserNotFoundError } from '../errors/UserErrors'; import { CreateAuth } from '../models/creation/CreateAuth'; import { RefreshAuth } from '../models/creation/RefreshAuth'; @@ -29,8 +29,10 @@ export class AuthController { } @Post("/refresh") - @ResponseSchema(InvalidCredentialsError) + @ResponseSchema(JwtNotProvidedError) + @ResponseSchema(IllegalJWTError) @ResponseSchema(UserNotFoundError) + @ResponseSchema(RefreshTokenCountInvalidError) @OpenAPI({ description: 'refresh a access token' }) async refresh(@Body({ validate: true }) refreshAuth: RefreshAuth) { let auth;