Merge remote-tracking branch 'origin/dev' into feat/pagina-om-leerpaden-te-bekijken-#41

# Conflicts:
#	backend/src/controllers/learning-objects.ts
#	frontend/src/controllers/base-controller.ts
This commit is contained in:
Gerald Schmittinger 2025-04-01 09:00:28 +02:00
commit 99dc346dc1
155 changed files with 3463 additions and 2931 deletions

View file

@ -2,12 +2,12 @@ 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 {
export function controllerGetter<T>(factory: new () => T): () => T {
let instance: T | undefined;
return (): T => {
if (!instance) {
instance = new Factory();
instance = new factory();
}
return instance;
};

View file

@ -5,12 +5,12 @@ export class ThemeController extends BaseController {
super("theme");
}
getAll(language: string | null = null) {
async getAll(language: string | null = null): Promise<unknown> {
const query = language ? { language } : undefined;
return this.get<any[]>("/", query);
return this.get("/", query);
}
getHruidsByKey(themeKey: string) {
async getHruidsByKey(themeKey: string): Promise<string[]> {
return this.get<string[]>(`/${encodeURIComponent(themeKey)}`);
}
}