From fae4f020eb27387babef8174731002d14368c66f Mon Sep 17 00:00:00 2001 From: Aron Heinecke Date: Thu, 21 Apr 2022 21:05:14 +0200 Subject: [PATCH] fix autologin after actix upgrade --- src/main.rs | 1 - src/webview.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1b2932a..438441c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,7 +119,6 @@ async fn main() -> Result<()> { .app_data(web::Data::new(db_c.clone())) .app_data(auto_login_tokens.clone()) .app_data(web_client) - // developer for local testing .service( web::scope("/HardWhere") .service(web::resource("/api/checkedout").route(web::get().to(api::lent_list))) diff --git a/src/webview.rs b/src/webview.rs index b215895..1785cf8 100644 --- a/src/webview.rs +++ b/src/webview.rs @@ -104,7 +104,7 @@ pub(crate) async fn login( pub(crate) async fn snipeit_autologin_prepare( req: web::Json, cfg: web::Data
, - autologin_token: web::Data, + autologin_token: AutoLoginTokens, ) -> Result { info!("Received autologin prepare request"); let req = req.into_inner(); @@ -126,7 +126,7 @@ pub(crate) async fn auto_login( path: web::Path<(String,)>, session: Session, cfg: web::Data
, - autologin_token: web::Data, + autologin_token: AutoLoginTokens, ) -> Result { info!("performing auto login"); session.clear();