|
|
@ -13,9 +13,7 @@ import type { CreateUserDto } from '../controllers/auth.controller'; |
|
|
|
export class AuthService { |
|
|
|
export class AuthService { |
|
|
|
constructor(private usersService: UsersService) {} |
|
|
|
constructor(private usersService: UsersService) {} |
|
|
|
|
|
|
|
|
|
|
|
async validateUser(_email: string, pass: string): Promise<any> { |
|
|
|
async validateUser(email: string, pass: string): Promise<any> { |
|
|
|
const email = _email.toLowerCase(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const user = await this.usersService.findOne(email); |
|
|
|
const user = await this.usersService.findOne(email); |
|
|
|
if (user) { |
|
|
|
if (user) { |
|
|
|
const { password, salt, ...result } = user; |
|
|
|
const { password, salt, ...result } = user; |
|
|
|