Skip to content

Tag: nestjs

Bcrypt.compare always returns true

I am using NestJS and Passport to create a simple log in/registration form and I am using bcrypt to see if the password that has been hashed is matching the password that user provides in the login form, but it always returns true In the code above, even if I set the argument as a string it will return true

NestJs ParseEnumPipe can’t be resolve

I am using the NestJs framework (love it by the way) and I want to check the incoming data so it conforms with an Enum in Typscript. So I have the following: The weird thing is that when I run this code, the first pipe gets compiled What I am doing wrong? Answer You should use @Body(‘action’, new …

How to create dto of an complex object in NestJs

I’m a beginner at NestJs and I want to create a dto of the following struct: I want to create an API that can return this object using DTOs. I tried the following dto but I got an error in the service provider : I create 3 classes OneSessionResponseDto, SessionsResponseDto, and WeekResponseDto so I can …

Vulnerability in NestJS 8.4.5

Recently, when I run npm audit in my npm package, I receive the following error: The problem seems to be in the dicer package which is a very popular package used by NestJS. I searched the web for possible solutions but can’t find any fixes. Has anyone been able to fix this yet? Thanks in advance. Answe…