Memperbaiki fungsi invoke
This commit is contained in:
1 parent
2185c6e6fb
commit
f98cd2169a
3 files changed
+8
-3
No files matched your search
+5
-2
@@ -2,11 +2,13 @@ import { invoke } from "@tauri-apps/api/core";
|
||||
import { SBlueclasMuatanKirim, SBlueclasResponDaftarPerangkat } from "./models";
|
||||
|
||||
export async function cekIzin(): Promise<string> {
|
||||
return await invoke<string>("plugin:bluclas|cek_izin").then((res: string) => res);
|
||||
return await invoke<string>("plugin:bluclas|cek_izin", {}).then(
|
||||
(res: string) => res,
|
||||
);
|
||||
}
|
||||
|
||||
export async function mintaIzin(): Promise<null> {
|
||||
return await invoke<null>("plugin:bluclas|minta_izin");
|
||||
return await invoke<null>("plugin:bluclas|minta_izin", {});
|
||||
}
|
||||
|
||||
export async function daftarPerangkat(): Promise<
|
||||
@@ -14,6 +16,7 @@ export async function daftarPerangkat(): Promise<
|
||||
> {
|
||||
return await invoke<SBlueclasResponDaftarPerangkat[]>(
|
||||
"plugin:bluclas|daftar_perangkat",
|
||||
{},
|
||||
).then((res: SBlueclasResponDaftarPerangkat[]) => res);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user