Hey @Juan_N_A,
Welcome to the MongoDB Community!
Apologies for the late response.
It seems that the error you are encountering is likely due to the fact that the required fields (firstname, lastname, email, password) in your User schema are not being populated correctly or are missing in your request. This could be the reason that the variables you are trying to destructure from the request body actually do not exist. Please ensure that the request body contains the properties you are expecting.
Also, if you are planning to work with multiple schemas in the same project, make sure to define and handle each schema separately with their respective validation rules and requirements.
I hope this helps!
Best regards,
Kushagra