File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11import { Strategy } from 'passport-local' ;
22import { PassportStrategy } from '@nestjs/passport' ;
3- import { Inject , Injectable , UnauthorizedException } from '@nestjs/common' ;
3+ import {
4+ ForbiddenException ,
5+ Inject ,
6+ Injectable ,
7+ UnauthorizedException ,
8+ } from '@nestjs/common' ;
49import { AuthService } from './auth.service' ;
510
611@Injectable ( )
@@ -15,7 +20,7 @@ export class LocalStrategy extends PassportStrategy(Strategy) {
1520 async validate ( email : string , password : string ) : Promise < any > {
1621 const user = await this . authService . validateUser ( email , password ) ;
1722 if ( ! user ) {
18- throw new UnauthorizedException ( 'Неверные учетные данные' ) ;
23+ throw new ForbiddenException ( 'Неверные учетные данные' ) ;
1924 }
2025 return user ;
2126 }
You can’t perform that action at this time.
0 commit comments