Remove
/api/v2/profile/remove
Post
profiles
jwt
Purpose
To allow a user to remove a follow request or follower.
Body Content [input]
{
uid: string,
profileID: string
}
Returns if valid [output]
{
message: string,
error: 0
}
What the API does
- Checks that
uid
andprofileID
aren’t the same value [403]. - Fetches the profile for the record with a
uid
corresponding to theuid
passed (receptor
) [404]. - Fetches the profile for the record with a
uid
corresponding to theprofileID
passed (sender
) [404]. - Filter out
receptor
’sreceived_follow_requests
andfollowers
to remove all values equal toprofileID
. - Filter out
sender
’ssent_follow_requests
andfollowing
to remove all values equal touid
.