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());