aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/ui/account/mod.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-20 23:12:28 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-20 23:12:28 +0100
commit5177497b3cf376403a8daab2e5ca9408ad2625bd (patch)
treed496e868bbc5540e2ca6bbc5719b7d3ea08e836f /server/src/routes/ui/account/mod.rs
parent7fc7c2452b4256fe7302b6f7b6bb83c8ebb305da (diff)
downloadjellything-5177497b3cf376403a8daab2e5ca9408ad2625bd.tar
jellything-5177497b3cf376403a8daab2e5ca9408ad2625bd.tar.bz2
jellything-5177497b3cf376403a8daab2e5ca9408ad2625bd.tar.zst
update rocket to crates.io
Diffstat (limited to 'server/src/routes/ui/account/mod.rs')
-rw-r--r--server/src/routes/ui/account/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/routes/ui/account/mod.rs b/server/src/routes/ui/account/mod.rs
index 8af92a0..eeafce1 100644
--- a/server/src/routes/ui/account/mod.rs
+++ b/server/src/routes/ui/account/mod.rs
@@ -186,12 +186,12 @@ pub fn r_account_login_post(
None => return Err(format_form_error(form)),
};
jar.add(
- Cookie::build(
+ Cookie::build((
"session",
login_logic(database, &form.username, &form.password, None, None)?,
- )
+ ))
.permanent()
- .finish(),
+ .build(),
);
Ok(Redirect::found(rocket::uri!(r_home())))
@@ -199,7 +199,7 @@ pub fn r_account_login_post(
#[post("/account/logout")]
pub fn r_account_logout_post(jar: &CookieJar) -> MyResult<Redirect> {
- jar.remove_private(Cookie::named("session"));
+ jar.remove_private(Cookie::build("session"));
Ok(Redirect::found(rocket::uri!(r_home())))
}