talawa-api / Exports / resolvers/Mutation/acceptMembershipRequest
Module: resolvers/Mutation/acceptMembershipRequest
Table of contents
Variables
Variables
acceptMembershipRequest
• Const
acceptMembershipRequest: MutationResolvers
["acceptMembershipRequest"
]
This function accepts the membership request sent by a user.
Param
parent of current request
Param
payload provided with the request
Param
context of entire application
Remarks
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.