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
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:
@@ -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",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user