Menyelesaikan plugin, siap ucob
Penerbitan Plugin / persiapan (pull_request) Successful in 5s
Penerbitan Plugin / penerbitan (pull_request) Failing after 1m29s

This commit is contained in:
rizky_denianto committed 2026-09-02 23:13:23 +07:00
1 parent 6f5478e9ab
commit caf005b82d
14 files changed
+312 -15

No files matched your search

+10 -3
View File
@@ -15,7 +15,7 @@ pub fn init<R: Runtime, C: DeserializeOwned>(
api: PluginApi<R, C>,
) -> crate::Result<Auth<R>> {
#[cfg(target_os = "android")]
let handle = api.register_android_plugin("", "ExamplePlugin")?;
let handle = api.register_android_plugin("com.plugin.auth", "AuthPlugin")?;
#[cfg(target_os = "ios")]
let handle = api.register_ios_plugin(init_plugin_auth)?;
Ok(Auth(handle))
@@ -25,7 +25,14 @@ pub fn init<R: Runtime, C: DeserializeOwned>(
pub struct Auth<R: Runtime>(PluginHandle<R>);
impl<R: Runtime> Auth<R> {
pub fn autentikasi(&self) -> crate::Result<Vec<()>> {
return self.0.run_mobile_plugin("autentikasi").map_err(Into::into);
pub fn masuk(&self, payload: SAuthMuatanMasuk) -> crate::Result<()> {
return self
.0
.run_mobile_plugin("masuk", payload)
.map_err(Into::into);
}
pub fn keluar(&self) -> crate::Result<Vec<()>> {
return self.0.run_mobile_plugin("keluar", ()).map_err(Into::into);
}
}