implemented adding and editing of tasks

This commit is contained in:
z1glr
2025-01-19 01:16:22 +00:00
parent e17c9db90c
commit 3c30d6c163
18 changed files with 470 additions and 54 deletions

View File

@@ -94,12 +94,13 @@ export function vaidatePassword(password: string): string[] {
}
export interface Task {
id: number | undefined;
text: string;
enabled: boolean;
}
export async function getTasks(): Promise<Record<number, Task>> {
const result = await apiCall<Task[]>("GET", "tasks");
export async function getTaskMap(): Promise<Record<number, Task>> {
const result = await apiCall<Task[]>("GET", "tasks", { map: true });
if (result.ok) {
const tasks = await result.json();