diff options
author | cel 🌸 <cel@blos.sm> | 2023-12-13 06:50:44 +0000 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-12-13 06:50:44 +0000 |
commit | a971d8c2dc519b1db805c72cf3395c188a98dff4 (patch) | |
tree | 98e7db2d690b778b605cf8027cd14ad1eae1f053 /src/routes/home.rs | |
parent | a587459a1817c0fc57b46df3f9c69567e1e775b7 (diff) | |
download | pinussy-a971d8c2dc519b1db805c72cf3395c188a98dff4.tar.gz pinussy-a971d8c2dc519b1db805c72cf3395c188a98dff4.tar.bz2 pinussy-a971d8c2dc519b1db805c72cf3395c188a98dff4.zip |
switch to uuids
Diffstat (limited to 'src/routes/home.rs')
-rw-r--r-- | src/routes/home.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/home.rs b/src/routes/home.rs index a43eabc..f2642a5 100644 --- a/src/routes/home.rs +++ b/src/routes/home.rs @@ -1,5 +1,6 @@ use actix_session::Session; use actix_web::{get, web, HttpResponse}; +use uuid::Uuid; use crate::templates; use crate::{Pinussy, Result}; @@ -7,7 +8,7 @@ use crate::{Pinussy, Result}; #[get("/")] async fn get(session: Session, state: web::Data<Pinussy>) -> Result<HttpResponse> { let username: Option<String>; - if let Some(user_id) = session.get::<i32>("user_id")? { + if let Some(user_id) = session.get::<Uuid>("user_id")? { username = Some(state.db.users().read(user_id).await?.username) } else { username = None |