feat: basecontroller

This commit is contained in:
Gabriellvl 2025-03-21 23:50:57 +01:00
parent 4cceed3ea9
commit 47a522e443
6 changed files with 108 additions and 36 deletions

View file

@ -0,0 +1,16 @@
import {BaseController} from "@/controllers/base-controller.ts";
export class ThemeController extends BaseController {
constructor() {
super("theme");
}
getAll(language: string | null = null) {
const query = language ? { language } : undefined;
return this.get<any[]>("/", query);
}
getHruidsByKey(themeKey: string) {
return this.get<string[]>(`/${encodeURIComponent(themeKey)}`);
}
}