Who:As a developer
What:I want to redirect the user to the Career Quiz Result Page (issue #19 ) once the user finishes the Quiz
Why:so that we can show the Career Quiz Results associated with the Quiz that was just done by the user and that were saved on the DB (retrieved using an extended version of the endpoint developed on issue #32
Implementation details for the page
Make sure that once the Quiz ends you have a way to check the user id or if it is an anonymous user.
Make a call to the endpoint using the user id as a parameter, see more detailed instructions below in Implementation details for the endpoint
Make sure the get the result from the endpoint and show which profile did the Quiz Returned and load that result (get some inspiration from #19)
Make sure that both Sign in button and Career Path Button are working and redirecting you to the right page.
Implementation details for the endpoint
Make sure that there is GET endpoint for /api/quiz-results that returns that last total number os answers for a specific quiz answered by a specific user and that that total number has sequence Quiz_result ids so that we are sure that it's a complete Quiz result.
Remember to split the story into smaller PR's! Maybe you can do a PR with just the words, filter fx. You can also choose to do it in separate commits. just be very aware of the PR's not becoming too big!
User story
Who: As a developer What: I want to redirect the user to the Career Quiz Result Page (issue #19 ) once the user finishes the Quiz Why: so that we can show the Career Quiz Results associated with the Quiz that was just done by the user and that were saved on the DB (retrieved using an extended version of the endpoint developed on issue #32
Implementation details for the page
Make sure that once the Quiz ends you have a way to check the user id or if it is an anonymous user.
Make a call to the endpoint using the user id as a parameter, see more detailed instructions below in Implementation details for the endpoint
Make sure the get the result from the endpoint and show which profile did the Quiz Returned and load that result (get some inspiration from #19)
Make sure that both Sign in button and Career Path Button are working and redirecting you to the right page.
Implementation details for the endpoint
GET
endpoint for/api/quiz-results
that returns that last total number os answers for a specific quiz answered by a specific user and that that total number has sequence Quiz_result ids so that we are sure that it's a complete Quiz result.Remember to split the story into smaller PR's! Maybe you can do a PR with just the words, filter fx. You can also choose to do it in separate commits. just be very aware of the PR's not becoming too big!
Check the README file here https://github.com/HackYourFuture-CPH/guide-it#-working-with-api-documentation---swagger and this article should also help you with that https://blog.logrocket.com/documenting-your-express-api-with-swagger/