Question · NestJS course · Module 4: Authentication

@Exclude() decorator in Entity

What is the purpose of the @Exclude() decorator on the password field in a User entity?

Answer options

  • Removes the field from the database
  • Automatically encrypts the password
  • Prevents the password from being returned in the API response
  • Validates the password correctness

You can check the correct answer by solving this task in the CodeWorlds game.