From 72c9d232bef2e735559ce1a36f49bdebd661f70c Mon Sep 17 00:00:00 2001 From: Gerald Schmittinger Date: Thu, 17 Apr 2025 00:53:47 +0200 Subject: [PATCH] fix(backend): Foute retourwaarde voor submissions verbeterd. --- backend/src/controllers/submissions.ts | 2 +- frontend/src/views/learning-paths/LearningObjectView.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/controllers/submissions.ts b/backend/src/controllers/submissions.ts index f79294b7..a3d7694a 100644 --- a/backend/src/controllers/submissions.ts +++ b/backend/src/controllers/submissions.ts @@ -37,7 +37,7 @@ export async function getSubmissionsHandler(req: Request, res: Response): Promis ) } - res.json(submissions); + res.json({ submissions }); } export async function getSubmissionHandler(req: Request, res: Response): Promise { diff --git a/frontend/src/views/learning-paths/LearningObjectView.vue b/frontend/src/views/learning-paths/LearningObjectView.vue index 728eac80..bfa7a6b9 100644 --- a/frontend/src/views/learning-paths/LearningObjectView.vue +++ b/frontend/src/views/learning-paths/LearningObjectView.vue @@ -11,7 +11,7 @@ import type {GroupDTO} from "@dwengo-1/common/interfaces/group"; import type {StudentDTO} from "@dwengo-1/common/interfaces/student"; import type {LearningObjectIdentifierDTO} from "@dwengo-1/common/interfaces/learning-content"; - import type {User, UserProfile} from "oidc-client-ts"; + import type {UserProfile} from "oidc-client-ts"; const isStudent = computed(() => authService.authState.activeRole === "student"); @@ -135,7 +135,7 @@ class="learning-object-container" v-html="learningPathHtml.data.body.innerHTML" > -

Last submissions: {{ existingSubmissions?.submissions?.map(it => it.content) }}

+

Last submissions: {{ existingSubmissions }}

Your answer: {{ currentAnswer }}