The /api/quizzes/{objectId} endpoint should return a quiz object or 404 if not found.
To reach the goal of this issue, the following tasks need to be done:
[x] add retrieve_quiz function to quizapp/backend/quizapp/crud.py
[x] add get_quiz endpoint function to quizapp/backend/quizapp/routers/quizzes.py with proper error handling of quiz if it is not in the database
[x] if the test database is set up by the time you're working on this issue, please add tests to your endpoint.
The
/api/quizzes/{objectId}
endpoint should return a quiz object or 404 if not found. To reach the goal of this issue, the following tasks need to be done:retrieve_quiz
function toquizapp/backend/quizapp/crud.py
get_quiz
endpoint function toquizapp/backend/quizapp/routers/quizzes.py
with proper error handling of quiz if it is not in the databaseFor guidance: