Link Search Menu Expand Document

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 and profileID aren’t the same value [403].
  • Fetches the profile for the record with a uid corresponding to the uid passed (receptor) [404].
  • Fetches the profile for the record with a uid corresponding to the profileID passed (sender) [404].
  • Filter out receptor’s received_follow_requests and followers to remove all values equal to profileID.
  • Filter out sender’s sent_follow_requests and following to remove all values equal to uid.