added adding and editing of availabilities

This commit is contained in:
z1glr
2025-01-18 13:25:12 +00:00
parent e37310b774
commit e17c9db90c
24 changed files with 737 additions and 163 deletions

View File

@@ -95,14 +95,11 @@ export function vaidatePassword(password: string): string[] {
export interface Task {
text: string;
disabled: boolean;
enabled: boolean;
}
export async function getTasks(): Promise<Record<number, Task>> {
const result = await apiCall<{ text: string; disabled: boolean }[]>(
"GET",
"tasks",
);
const result = await apiCall<Task[]>("GET", "tasks");
if (result.ok) {
const tasks = await result.json();