feat: basecontroller
This commit is contained in:
parent
4cceed3ea9
commit
47a522e443
6 changed files with 108 additions and 36 deletions
16
frontend/src/controllers/themes.ts
Normal file
16
frontend/src/controllers/themes.ts
Normal 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)}`);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue