Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Mar 24, 2024
1 parent a6dab6f commit 07b8468
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ impl SessionStore {

pub async fn lookup(&self, session_id: Uuid) -> anyhow::Result<Option<(Uuid, i16)>> {
let mut conn = self.redis.get().await?;
let inner = conn.hgetall::<_, Option<Inner>>(session_id).await?;
Ok(inner.map(|session| (session.user_id, session.roles)))
let inner = conn.hgetall::<_, Inner>(session_id).await?;
// TODO: handle not present
Ok(Some((inner.user_id, inner.roles)))
}
}

Expand Down

0 comments on commit 07b8468

Please sign in to comment.