Closed UXProv closed 11 months ago
Edit: Updated the git repository to an open one. Deleted all unused modules and env variables, left db variable to allow testing (I'm using atlas and that DB is currently running). DB and secret will be changed after issue is resolved. To create a user in postman:
localhost:3000/user/register
{
"email" : "email@email.com",
"username" : "testuser",
"handle" : "test",
"password" : "Test12345.",
"retypedPassword" : "Test12345."
}
To test the empty return:
{
"username": "test",
"password" : "Test12345."
}```
Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.
Is there an existing issue for this?
Current behavior
I have a project in nestJs, with mongosee, and I want to exclude certain properties from returned object. Specifically:
And when I try this:
I get returned an empty object. I also tried adding:
All controllers I tried with ClassSerializerInterceptor returns an empty object.
To the main.ts but I get again an empty object as a response. I tried other solutions but none worked. Getting kind of desperate at this point.
Using: "mongoose": "^7.5.2", "@nestjs/core": "^10.0.0"
Minimum reproduction code
https://github.com/UXProv/squadron-backend-debug
Steps to reproduce
No response
Expected behavior
Retrieve the user without the @Exclude fields
Package
Other package
No response
NestJS version
v10.00.00
Packages versions
Node.js version
v20.9.0
In which operating systems have you tested?
Other
.