NJIT-CLASS / backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Endpoint to deal with a user's admin status

srmor opened this issue · comments

1. Make a user an admin

Method: PUT
Body (JSON):

  • user ID

Response:

  • status code 401 if the user doesn't exist
  • status code 200 if they were successfully made an admin

2. Make a user not an admin

Method: PUT
Body (JSON):

  • user ID
  • password

Response:

  • status code 401 if the user's password is invalid or the user is not valid
  • status code 200 if the user's admin status was successfully changed

Implemented and tested in the test server