Table of contents
This function accepts the membership request sent by a user.
parent of current request
payload provided with the request
context of entire application
The following checks are done:
- Whether the membership request exists or not.
- Whether thr organization exists or not
- Whether the user exists
- whether currentUser with _id === context.userId is an admin of organization.
- Whether user is already a member of organization.