fix: working tasks after first tests
TS Lint / ESLint (push) Successful in 1m0s
Python Lint CI / ty (push) Successful in 1m6s
Python Lint CI / ruff (push) Successful in 1m7s
Python Lint CI / ruff-format-check (push) Successful in 1m12s
TS Lint / Oxlint (push) Failing after 4m55s
TS Lint / TypeScript (push) Successful in 5m15s

This commit is contained in:
2026-07-05 23:07:11 +02:00
parent 568f22e2d5
commit 56a41989f0
7 changed files with 50 additions and 64 deletions
+5 -6
View File
@@ -11,27 +11,26 @@ export async function createTask(
): Promise<RawTask> {
const response = await fetch(`/api/lists/${list}/tasks`, {
method: "POST",
body: JSON.stringify({ data }),
body: JSON.stringify({ ...data }),
headers: { "Content-Type": "application/json" },
});
return await response.json();
}
export async function updateTask(
list: string,
taskId: string,
data: TaskUpdateData,
): Promise<RawTask> {
const response = await fetch(`/api/lists/${list}/tasks/${taskId}`, {
const response = await fetch(`/api/tasks/${taskId}`, {
method: "PUT",
body: JSON.stringify({ data }),
body: JSON.stringify({ ...data }),
headers: { "Content-Type": "application/json" },
});
return await response.json();
}
export async function deleteTask(list: string, taskId: string): Promise<void> {
await fetch(`/api/lists/${list}/tasks/${taskId}`, {
export async function deleteTask(taskId: string): Promise<void> {
await fetch(`/api/tasks/${taskId}`, {
method: "DELETE",
});
}
+1 -1
View File
@@ -9,7 +9,7 @@ export interface RawTask {
id: string;
created_at: string;
updated_at: string;
list: string;
list_name: string;
name: string;
reset_cron: string | null;
check_date: string | null;