feat(backend): Controllers for learningObjects en learningPaths toegevoegd.
This commit is contained in:
parent
2803a8be54
commit
5cfabb3518
4 changed files with 28 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue