feat: add user submission functionality
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { User } from '@/modules/users/entities/user.entity';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
|
||||
@Injectable()
|
||||
export class OptionalJwtGuard extends AuthGuard('jwt') {
|
||||
handleRequest<TUser = User>(err: any, user: TUser): TUser | null {
|
||||
return user ?? null;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ Content-Type: application/json
|
||||
lang: fa
|
||||
|
||||
{
|
||||
"phone": "09121111111",
|
||||
"phone": "09333026363",
|
||||
"password": "Password1@"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user