Create PUT request resonsible for updating tournament contestant's roles. Remember to check if the person trying to update the tournament is the owner of the tournament or an admin (is on an admin list).
Behind the scenes it's only moving user's ID from contestants list to admins list or vice versa.
Example request
PUT API_URL/tournaments/fj8190j8sa0jf802/role
Body
Required:
userID
role - only vaible options are contestant and admin
userToChangeID - user that role is to change
Path parameter
tournamentID
Response
Response should contain userID of user that role was changed.
Create PUT request resonsible for updating tournament contestant's roles. Remember to check if the person trying to update the tournament is the owner of the tournament or an admin (is on an admin list).
Behind the scenes it's only moving user's ID from contestants list to admins list or vice versa.
Example request
PUT API_URL/tournaments/fj8190j8sa0jf802/role
Body
Required:
Path parameter
Response
Response should contain userID of user that role was changed.