fix(backend): Diverse bugfixes omtrent LearningPathPage

This commit is contained in:
Gerald Schmittinger 2025-03-31 23:12:03 +02:00
parent 27b9cdf833
commit 12b9f31f5f
9 changed files with 34 additions and 33 deletions

View file

@ -2,6 +2,7 @@ import {BaseController} from "@/controllers/base-controller.ts";
import {LearningPath} from "@/data-objects/learning-path.ts";
import type {LearningPathDTO} from "@/data-objects/learning-path.ts";
import type {Language} from "@/data-objects/language.ts";
import {single} from "@/utils/response-assertions.ts";
export class LearningPathController extends BaseController {
constructor() {
@ -18,6 +19,6 @@ export class LearningPathController extends BaseController {
forGroup: options?.forGroup,
forStudent: options?.forStudent
});
return dtos.map(dto => LearningPath.fromDTO(dto))
return LearningPath.fromDTO(single(dtos));
}
}