From 238e57e106660a6e568b129413ade2eb340d4459 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Fri, 21 Jul 2023 17:25:24 +0200 Subject: [PATCH] what the heck was I doing here?? --- src/http/session.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/http/session.rs b/src/http/session.rs index c02ca41..6e7e248 100644 --- a/src/http/session.rs +++ b/src/http/session.rs @@ -95,13 +95,12 @@ pub async fn refresh_sessions( { let database = Database::from(&state); if let Ok(Some((session, user))) = database.find_session(session_id).await { - // session validity requirements: secret must match, session must not have been expired + // session validity requirements: secret must match, session must not have expired if session.secret == session_secret && session.expires_at >= Utc::now().naive_utc() { // in the future we might wanna change the session secret, if we do, do it here! - if let Ok((session, user)) = database + if let Ok(session) = database .refresh_session(session, Duration::seconds(state.config.session_duration)) .await - .map(|s| (s, user)) { let extensions = req.extensions_mut(); extensions.insert(session.clone());