Set cookie for username

pull/5/head
~erin 2021-07-22 09:31:31 -04:00
parent 244c185fc8
commit 3636de139f
Signed by: erin
GPG Key ID: DA70E064A8C70F44
1 changed files with 1 additions and 0 deletions

View File

@ -97,6 +97,7 @@ pub fn check_pin(mut cookies: Cookies, name: String, pin: i32) -> JsonValue {
// Create token for user & set a cookie
let token = create_token(i.name.clone(), users);
cookies.add(Cookie::new("token", token));
cookies.add(Cookie::new("user", name));
info!("set the token cookie");
return json!({