Leave
/api/v2/group/leave
Post
groups
jwt
Purpose
To allow a user to leave a group that he/she is already a member of.
Body Content [input]
{
uid: string,
groupID: string
}
Returns if valid [output]
{
message: string,
error: 0
}
What the API does
- Finds the
group
being referenced by thegroupID
passed [404]. - Ensures that
uid
corresponds to a record in themembers
field with astatus
ofaccepted
[403]. - Removes the record in the
members
field corresponding touid
from thegroup
.