📜  nestjs mongoose ClassSerializerInterceptor 不起作用 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:21.135000             🧑  作者: Mango

代码示例1
async validateUser(email: string, password: string): Promise {
    const user = await this.usersService.findOne({ email });

    if (user && await compare(password, user.password))
    {
        return plainToClass(UserWithoutPassword, user.toObject());
    }

    return null;
}