chore: update /exams response (#57157)

This commit is contained in:
Shaun Hamilton
2024-11-15 08:09:08 +02:00
committed by GitHub
parent c2f2467ca5
commit 9f3e827e37
3 changed files with 23 additions and 29 deletions

View File

@@ -573,19 +573,17 @@ describe('/exam-environment/', () => {
expect(res.status).toBe(200);
expect(res.body).toStrictEqual({
data: {
exams: [
{
canTake: true,
config: {
name: mock.exam.config.name,
note: mock.exam.config.note,
totalTimeInMS: mock.exam.config.totalTimeInMS
},
id: mock.examId
}
]
}
exams: [
{
canTake: true,
config: {
name: mock.exam.config.name,
note: mock.exam.config.note,
totalTimeInMS: mock.exam.config.totalTimeInMS
},
id: mock.examId
}
]
});
});
});

View File

@@ -599,8 +599,6 @@ async function getExams(
});
return reply.send({
data: {
exams: availableExams
}
exams: availableExams
});
}

View File

@@ -7,19 +7,17 @@ export const examEnvironmentExams = {
response: {
200: Type.Union([
Type.Object({
data: Type.Object({
exams: Type.Array(
Type.Object({
id: Type.String(),
config: Type.Object({
name: Type.String(),
note: Type.String(),
totalTimeInMS: Type.Number()
}),
canTake: Type.Boolean()
})
)
})
exams: Type.Array(
Type.Object({
id: Type.String(),
config: Type.Object({
name: Type.String(),
note: Type.String(),
totalTimeInMS: Type.Number()
}),
canTake: Type.Boolean()
})
)
}),
STANDARD_ERROR
])