You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, i'll try to be very clear since my english is not that good though. LOL.
I'm trying to create a person to create a user. My problem is: I have to instantiate my UserSchema to create NodeRestful Model and so the methods (get, post, etc.), but my UserSchema has a default value who receives by default a person objectId, 'cause I cannot have a user without have a person, right?
But, I only create a person right before user post action. BUT HOW I'LL INSTANTIATE USER WITHOUT HAVING A PERSON ID? I'M STUCK.
Well, i'll try to be very clear since my english is not that good though. LOL.
I'm trying to create a person to create a user. My problem is: I have to instantiate my UserSchema to create NodeRestful Model and so the methods (get, post, etc.), but my UserSchema has a default value who receives by default a person objectId, 'cause I cannot have a user without have a person, right?
But, I only create a person right before user post action. BUT HOW I'LL INSTANTIATE USER WITHOUT HAVING A PERSON ID? I'M STUCK.
Check my code and try to understand yourselves.
routes.js
user-service.js
user.js
person.js
Please guys, help me, i'm very lost.
The text was updated successfully, but these errors were encountered: