CS3219-AY2324S1 / ay2324s1-course-assessment-g11

ay2324s1-course-assessment-g11 created by GitHub Classroom
MIT License
3 stars 2 forks source link

Fix admin verification #161

Closed yhtMinceraft1010X closed 11 months ago

yhtMinceraft1010X commented 11 months ago

Fixes #143

Admin verification does not work because app.get(), app.post() etc are used to apply the verification as middleware even though this is not the correct way to do so.

Let's switch to app.use and decide whether to do the verification in the middleware using the req.method property.

yhtMinceraft1010X commented 11 months ago

LGTM - does this mean that we can manually set admins now? - can we do this via the UI or only through BE

There's no admin UI as of yet, but the admin service in the backend has routes that allow setting users to admins