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
We will have a "new" resource called registrants, so we would want to make a REST API for it. There are 5 routes that will allow us to interact with this resource with admin perms, they are the following:
All registrants from event with {{event_id}}, each registrant is populated with the referenced user model in the userId field. (You should be able to just use .populate())
Registrants with {{user_id}} from event with {{event_id}}, the registrant is populated with the referenced user model in the userId field. (You should be able to just use .populate())
Postman Doc: https://drive.google.com/file/d/1f8CN7oUe0EsPWoTWN_23TpPaxWFZjivi/view?usp=drive_link
We will have a "new" resource called registrants, so we would want to make a REST API for it. There are 5 routes that will allow us to interact with this resource with admin perms, they are the following:
Get all registrants
GET: {{server_url}}/api/admin/events/{{event_id}}/registrants
Things expected from the request body:
Things to return:
userId
field. (You should be able to just use.populate()
)Get registrants by ID
GET: {{server_url}}/api/admin/events/{{event_id}}/registrants//{{user_id}}
Things expected from the request body:
Things to return:
userId
field. (You should be able to just use.populate()
)Attach registrant by ID
POST: {{server_url}}/api/admin/events/{{event_id}}/registrants//{{user_id}}
Things expected from the request body:
userId
: ObjectIDadditionalFieldsSchema
field of the event to attach toThings to return:
Patch event by ID
PATCH: {{server_url}}/api/admin/events/{{event_id}}/registrants//{{user_id}}
Things expected from the request body:
additionalFieldsSchema
Things to return:
Delete event by ID
DELETE: {{server_url}}/api/admin/events/{{event_id}}/registrants//{{user_id}}
Things expected from the request body:
Things to return:
The text was updated successfully, but these errors were encountered: