Have tested what I can. Awaiting #47 to test properly (once user tokens work on the frontend).
Breaking changes:
Devs must add USER_SERVICE_URL="http://localhost:3002" to their env file for question service
All question routes now require the user token to be included in the body, and will forbid access if no token is provided, or if that particular route requires isAdmin but that user is not an admin
All routes which used to accept QuestionDocs directly as the body, must now nest said doc as a value of key questionDoc.
i.e. instead of the frontend sending JSON where req.body = { ... } containing the key-value pairs of the QuestionDoc directly, you must instead send { token: ..., questionDoc: ... }
See also #47
User service default port has changed to 3002, to host alongside frontend
Closes #30, closes #45.
Have tested what I can. Awaiting #47 to test properly (once user tokens work on the frontend).
Breaking changes:
USER_SERVICE_URL="http://localhost:3002"
to their env file for question serviceisAdmin
but that user is not an adminquestionDoc
. i.e. instead of the frontend sending JSON wherereq.body = { ... }
containing the key-value pairs of the QuestionDoc directly, you must instead send{ token: ..., questionDoc: ... }