ucsb-cs156-f23 / proj-organic-f23-6pm-1

https://ucsb-cs156-f23.github.io/proj-organic-f23-6pm-1/
0 stars 0 forks source link

Ensure Roles Update Correctly using Interceptors #57

Closed Johnsonchan105 closed 9 months ago

Johnsonchan105 commented 9 months ago
jakedel commented 9 months ago

Fixed the issue of the 400 error by changing the parameter name in User Controller toggleAdmin and toggleInstructor from "Github Id" to "id". It should work now when toggling.

Wanted to do a more thorough code review to ensure this is all working.

Review: Running locally first. Pulled branch, ran npm install, server and frontend started correctly! Checked my user, admin=true, instructor=false:

1

Ran toggleInstructor:

2

Ran toggleAdmin:

3

Ran toggleAdmin again to check that second toggle works:

4

Tested on dokku organic-qa too. Looks like it works, checked GET /api/admin/users too and it updated my instructor status to true.

5

mvn test successful 6

jacoco looks like full coverage 7

LGTM :)

chauAlex commented 9 months ago

Working on fixing up the tests right now