mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
delete command
This commit is contained in:
1 parent
a32eb6c64b
commit
25aa77fff1
1 file changed
+21
@@ -0,0 +1,21 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { CommandResult } from "../../common/CommandStatus";
|
||||
|
||||
export interface MediaFileDeleteSuccess extends CommandResult {
|
||||
payload: MediaFileDeletePayload;
|
||||
}
|
||||
|
||||
export interface MediaFileDeletePayload {
|
||||
}
|
||||
|
||||
export const MediaFileDelete = async (media_file_token: string) : Promise<MediaFileDeleteSuccess> => {
|
||||
try {
|
||||
return await invoke("media_file_delete_command", {
|
||||
request: {
|
||||
media_file_token: media_file_token
|
||||
}
|
||||
}) as MediaFileDeleteSuccess;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user