Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
fix: pass app handle to authenticate function in hotmart_login
Tonho4a47d56caec9
diff --git a/src-tauri/src/commands/auth.rs b/src-tauri/src/commands/auth.rsindex 17f87a7f..8d6bd7de 100644--- a/src-tauri/src/commands/auth.rs+++ b/src-tauri/src/commands/auth.rs@@ -7,6 +7,7 @@ const SESSION_COOLDOWN: Duration = Duration::from_secs(5 * 60);#[tauri::command]pub async fn hotmart_login(+ app: tauri::AppHandle,state: tauri::State<'_, AppState>,email: String,password: String,@@ -23,7 +24,7 @@ pub async fn hotmart_login(*state.session_validated_at.lock().await = None;*state.courses_cache.lock().await = None;- match authenticate(&email, &password).await {+ match authenticate(&app, &email, &password).await {Ok(session) => {let response_email = session.email.clone();let _ = save_session(&session).await;