mark task dismissed and convert timestamps

This commit is contained in:
Brandon Thomas committed 2025-10-08 21:12:54 -04:00
1 parent 0c623b58ff
commit 9bb1e23f76
1 file changed
+22
@@ -0,0 +1,22 @@
import { invoke } from "@tauri-apps/api/core";
import { CommandResult } from "../../common/CommandStatus";
interface MarkTaskAsDismissedSuccess extends CommandResult {
payload: void;
}
export const MarkTaskAsDismissed = async (task_id: string) : Promise<MarkTaskAsDismissedSuccess> => {
try {
let result = await invoke("mark_task_as_dismissed_command", {
request: {
task: task_id
}
}) as MarkTaskAsDismissedSuccess;
return result;
} catch (error) {
throw error;
}
}
// Temporary just for testing -
(window as any).test_mark_task_as_dismissed = MarkTaskAsDismissed;