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
uidandprofileIDaren’t the same value [403]. - Fetches the profile for the record with a
uidcorresponding to theuidpassed (receptor) [404]. - Fetches the profile for the record with a
uidcorresponding to theprofileIDpassed (sender) [404]. - Filter out
receptor’sreceived_follow_requestsandfollowersto remove all values equal toprofileID. - Filter out
sender’ssent_follow_requestsandfollowingto remove all values equal touid.