/unit_data should include questions
Endpoint: @app.get("/unit_data", response_model=schemas.Unit)
Should include questions. What we see now (example response):
{
"hidden": false,
"title": "Databases",
"date_available": "2022-09-14",
"course_id": "TDT4101",
"course_semester": "fall2023",
"id": 4,
"reflections": [
{
"body": "woop",
"user_id": "sondralf@ntnu.no",
"unit_id": 4,
"question_id": 3,
"id": 1,
"timestamp": "2024-02-06"
},
{
"body": "test2",
"user_id": "sondralf@ntnu.no",
"unit_id": 4,
"question_id": 4,
"id": 2,
"timestamp": "2024-02-06"
}
]
}
Add to the endpoint:
{
question: {
id: "asdasd",
id2: "asdasdasd"
}
}