Memperbaiki tipe data respon daftar perangkat #18
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-bluclas"
|
name = "tauri-plugin-bluclas"
|
||||||
version = "0.1.0"
|
version = "0.1.8"
|
||||||
authors = [ "Rizky Denianto" ]
|
authors = [ "Rizky Denianto" ]
|
||||||
description = ""
|
description = ""
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|||||||
+5
-7
@@ -9,12 +9,10 @@ export type SBlueclasResponDaftarPerangkat = {
|
|||||||
data: SDaftarPerangkatBlueclasResponDaftarPerangkat[];
|
data: SDaftarPerangkatBlueclasResponDaftarPerangkat[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function daftarPerangkat(): Promise<
|
export async function daftarPerangkat(): Promise<SBlueclasResponDaftarPerangkat> {
|
||||||
SBlueclasResponDaftarPerangkat[]
|
return await invoke<SBlueclasResponDaftarPerangkat>(
|
||||||
> {
|
|
||||||
return await invoke<SBlueclasResponDaftarPerangkat[]>(
|
|
||||||
"plugin:bluclas|daftar_perangkat",
|
"plugin:bluclas|daftar_perangkat",
|
||||||
).then((res: SBlueclasResponDaftarPerangkat[]) => res);
|
).then((res: SBlueclasResponDaftarPerangkat) => res);
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SBlueclasMuatanKirim = {
|
export type SBlueclasMuatanKirim = {
|
||||||
@@ -22,10 +20,10 @@ export type SBlueclasMuatanKirim = {
|
|||||||
data: number[];
|
data: number[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function kirim(value: SBlueclasMuatanKirim): Promise<null> {
|
export async function kirim(muatan: SBlueclasMuatanKirim): Promise<null> {
|
||||||
return await invoke<null>("plugin:bluclas|kirim", {
|
return await invoke<null>("plugin:bluclas|kirim", {
|
||||||
payload: {
|
payload: {
|
||||||
value,
|
value: muatan,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@segubi/tauri-plugin-bluclas-api",
|
"name": "@segubi/tauri-plugin-bluclas-api",
|
||||||
"version": "0.1.7",
|
"version": "0.1.8",
|
||||||
"author": "Rizky Denianto",
|
"author": "Rizky Denianto",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
Reference in new issue
Block a user