Link Search Menu Expand Document

Update

/api/v2/access/update

Post

profiles

jwt


Purpose

To allow a user to update an existing Access Group.

Body Content [input]

{
    uid: string,
    accessID: string,
    name: string,
    members: string[]
}

Returns if valid [output]

{
    message: string,
    error: 0
}

What the API does

  • Loops through each of the member in the passed members field and ensures that there’s a record for that user in the profiles collection [404].
  • Finds the profile of the record corresponding to the uid passed from the profiles collection and updates the object inside of the access_groups field corresponding to the accessID field passed [404] with the values of the name and/ormembers fields passed.