website refactor

This commit is contained in:
2026-01-17 18:28:10 +01:00
parent 6d57f8b1ce
commit 64d9e7fd16
44 changed files with 1729 additions and 415 deletions

View File

@@ -20,7 +20,7 @@ export class ApiClient {
/**
* Make HTTP request to API
*/
private async request<T>(method: string, path: string, body?: any, headers: Record<string, string> = {}): Promise<T> {
private async request<T>(method: string, path: string, body?: unknown, headers: Record<string, string> = {}): Promise<T> {
const url = `${this.baseUrl}${path}`;
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
@@ -64,17 +64,17 @@ export class ApiClient {
}
// POST requests
async post<T>(path: string, body: any, headers?: Record<string, string>): Promise<T> {
async post<T>(path: string, body: unknown, headers?: Record<string, string>): Promise<T> {
return this.request<T>('POST', path, body, headers);
}
// PUT requests
async put<T>(path: string, body: any, headers?: Record<string, string>): Promise<T> {
async put<T>(path: string, body: unknown, headers?: Record<string, string>): Promise<T> {
return this.request<T>('PUT', path, body, headers);
}
// PATCH requests
async patch<T>(path: string, body: any, headers?: Record<string, string>): Promise<T> {
async patch<T>(path: string, body: unknown, headers?: Record<string, string>): Promise<T> {
return this.request<T>('PATCH', path, body, headers);
}