mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 10:11:31 +00:00
mark task dismissed and convert timestamps
This commit is contained in:
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;
|
||||
Reference in new issue
Block a user