nestjs mongoose classserializerinterceptor not working

Solutions on MaxInterview for nestjs mongoose classserializerinterceptor not working by the best coders in the world

showing results for - "nestjs mongoose classserializerinterceptor not working"
Ian
31 Jul 2020
1async validateUser(email: string, password: string): Promise<UserWithoutPassword | null> {
2    const user = await this.usersService.findOne({ email });
3
4    if (user && await compare(password, user.password))
5    {
6        return plainToClass(UserWithoutPassword, user.toObject());
7    }
8
9    return null;
10}
11
12