summaryrefslogtreecommitdiffstats
path: root/src/routes/login.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-12-13 06:50:44 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2023-12-13 06:50:44 +0000
commita971d8c2dc519b1db805c72cf3395c188a98dff4 (patch)
tree98e7db2d690b778b605cf8027cd14ad1eae1f053 /src/routes/login.rs
parenta587459a1817c0fc57b46df3f9c69567e1e775b7 (diff)
downloadpinussy-a971d8c2dc519b1db805c72cf3395c188a98dff4.tar.gz
pinussy-a971d8c2dc519b1db805c72cf3395c188a98dff4.tar.bz2
pinussy-a971d8c2dc519b1db805c72cf3395c188a98dff4.zip
switch to uuids
Diffstat (limited to '')
-rw-r--r--src/routes/login.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/routes/login.rs b/src/routes/login.rs
index c6cf077..bd7eaf1 100644
--- a/src/routes/login.rs
+++ b/src/routes/login.rs
@@ -30,8 +30,7 @@ async fn post(
match state.db.users().read_username(&form.username).await {
Ok(user) => {
if user.verify_password(&form.password)? {
- let user_id = state.db.users().get_id(&form.username).await?;
- session.insert("user_id", user_id)?;
+ session.insert("user_id", user.id)?;
return Ok(HttpResponse::SeeOther()
.insert_header((LOCATION, "/"))
.finish());