Merge remote-tracking branch 'origin/dev' into feat/user-routes
# Conflicts: # backend/src/controllers/students.ts # backend/src/controllers/teachers.ts # backend/src/data/classes/class-join-request-repository.ts # backend/src/routes/students.ts # backend/src/services/students.ts # backend/src/services/teachers.ts # backend/tests/test_assets/users/students.testdata.ts # frontend/src/controllers/controllers.ts # frontend/src/queries/themes.ts
This commit is contained in:
commit
7f189188e8
139 changed files with 3594 additions and 3063 deletions
|
@ -7,7 +7,7 @@ export class BaseController {
|
|||
this.baseUrl = `${apiConfig.baseUrl}/${basePath}`;
|
||||
}
|
||||
|
||||
protected async get<T>(path: string, queryParams?: Record<string, any>): Promise<T> {
|
||||
protected async get<T>(path: string, queryParams?: Record<string, string | number | boolean>): Promise<T> {
|
||||
let url = `${this.baseUrl}${path}`;
|
||||
if (queryParams) {
|
||||
const query = new URLSearchParams();
|
||||
|
|
|
@ -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)}`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue