https://github.com/nhost/quiz-game-challenge
Quiz game challenge for candidates.
https://github.com/nhost/quiz-game-challenge
Last synced: 4 months ago
JSON representation
Quiz game challenge for candidates.
- Host: GitHub
- URL: https://github.com/nhost/quiz-game-challenge
- Owner: nhost
- Created: 2023-05-08T10:47:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-14T06:41:21.000Z (about 2 years ago)
- Last Synced: 2025-02-13T13:19:32.311Z (4 months ago)
- Language: HTML
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quiz Game Challenge
This is the backend for our quiz game challenge. Connect it to an Nhost project and you're good to go.
## Evaluating the solution
There is a lambda function called `evaluate` that candidates can use to evaluate their solution. It takes a single body parameter called `solutions`, which is an array of objects. Each object contains a `question_id` and an `answer_id`. The function returns a JSON object with a `score` and two arrays, `correctAnswers` and `wrongAnswers`.
Input:
```json
{
"solutions": [
{
"question_id": "a6d7a14c-58f0-4f33-9bf9-92580b6e1aa3",
"answer_id": "d72892ee-c1bd-472d-84a0-f44a75969f6b"
},
{
"question_id": "ac8d5695-24df-46f6-b4ce-6836d49a070c",
"answer_id": "871d7e9b-f81a-480d-9c8b-953faafb6983"
}
]
}
```Output:
```json
{
"score": 1,
"correctAnswers": [
{
"question_id": "a6d7a14c-58f0-4f33-9bf9-92580b6e1aa3",
"answer_id": "d72892ee-c1bd-472d-84a0-f44a75969f6b"
}
],
"wrongAnswers": [
{
"question_id": "ac8d5695-24df-46f6-b4ce-6836d49a070c",
"answer_id": "871d7e9b-f81a-480d-9c8b-953faafb6983"
}
]
}
```