Following the issue #1 if someone wants to unregister from the event.
The function should allow users to unregister from event.
The request body contains unqiue ID of event and user only.
- user model should have
events_enrolled field which previously contained the event ID in it. Remove that ID from the array
- events model should have
user_enrolled field which is array of object containing data regarding user, remove that too from the list.
NOTE:
- After unregistering the event, the user will have no record / history regarding the event.
- User can register again in the event.
Additionals:
Think about how history can be maintained while allowing the user to register again in the same event.
Following the issue #1 if someone wants to unregister from the event.
The function should allow users to unregister from event.
The request body contains unqiue ID of event and user only.
events_enrolledfield which previously contained the event ID in it. Remove that ID from the arrayuser_enrolledfield which is array of object containing data regarding user, remove that too from the list.NOTE:
Additionals:
Think about how history can be maintained while allowing the user to register again in the same event.