mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-07 06:19:08 +00:00
FIX: using Unauth nest function
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
HttpException,
|
||||
HttpStatus,
|
||||
Post,
|
||||
} from '@nestjs/common';
|
||||
import { Body, Controller, Post, UnauthorizedException } from '@nestjs/common';
|
||||
|
||||
import { AuthClientService } from 'src/clients/auth/client.service';
|
||||
|
||||
@@ -25,7 +19,7 @@ export class AuthController {
|
||||
.signIn({ username, password })
|
||||
.then((result) => result)
|
||||
.catch((err) => {
|
||||
throw new HttpException(err.message, HttpStatus.UNAUTHORIZED);
|
||||
throw new UnauthorizedException(err.message);
|
||||
});
|
||||
|
||||
return tokens;
|
||||
|
||||
Reference in New Issue
Block a user