Archived
Menyelesaikan plugin, siap ucob
This commit is contained in:
1 parent
6f5478e9ab
commit
caf005b82d
14 files changed
+312
-15
No files matched your search
+3
-1
@@ -19,6 +19,8 @@ use desktop::Auth;
|
||||
#[cfg(mobile)]
|
||||
use mobile::Auth;
|
||||
|
||||
use crate::commands::{keluar, masuk};
|
||||
|
||||
/// Extensions to [`tauri::App`], [`tauri::AppHandle`] and [`tauri::Window`] to access the auth APIs.
|
||||
pub trait AuthExt<R: Runtime> {
|
||||
fn auth(&self) -> &Auth<R>;
|
||||
@@ -33,7 +35,7 @@ impl<R: Runtime, T: Manager<R>> crate::AuthExt<R> for T {
|
||||
/// Initializes the plugin.
|
||||
pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
Builder::new("auth")
|
||||
.invoke_handler(tauri::generate_handler![commands::autentikasi])
|
||||
.invoke_handler(tauri::generate_handler![masuk, keluar])
|
||||
.setup(|app, api| {
|
||||
#[cfg(mobile)]
|
||||
let auth = mobile::init(app, api)?;
|
||||
|
||||
Reference in new issue
Block a user