fix(backend): Diverse bugfixes omtrent LearningPathPage
This commit is contained in:
parent
27b9cdf833
commit
12b9f31f5f
9 changed files with 34 additions and 33 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue