feat(backend): Controllers for learningObjects en learningPaths toegevoegd.

This commit is contained in:
Gerald Schmittinger 2025-03-31 16:23:38 +02:00
parent 2803a8be54
commit 5cfabb3518
4 changed files with 28 additions and 1 deletions

View file

@ -1,4 +1,6 @@
import { ThemeController } from "@/controllers/themes.ts";
import {LearningObjectController} from "@/controllers/learning-objects.ts";
import {LearningPathController} from "@/controllers/learning-paths.ts";
export function controllerGetter<T>(Factory: new () => T): () => T {
let instance: T | undefined;
@ -12,3 +14,5 @@ export function controllerGetter<T>(Factory: new () => T): () => T {
}
export const getThemeController = controllerGetter(ThemeController);
export const getLearningObjectController = controllerGetter(LearningObjectController);
export const getLearningPathController = controllerGetter(LearningPathController);