diff options
Diffstat (limited to 'src/controller/login.rs')
| -rw-r--r-- | src/controller/login.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/controller/login.rs b/src/controller/login.rs index f7e0695..252fdf8 100644 --- a/src/controller/login.rs +++ b/src/controller/login.rs @@ -1,8 +1,8 @@ use bcrypt; use http_body_util::Full; +use hyper::Response; use hyper::body::Bytes; use hyper::header::SET_COOKIE; -use hyper::Response; use std::collections::HashMap; use tokio_rusqlite::Connection; @@ -44,8 +44,7 @@ pub async fn login( { Some(hash) => match bcrypt::verify(login.password, &hash) { Ok(true) => { - // TODO: error handling - let login_token = cookie::generate_token().unwrap(); + let login_token = cookie::generate_token(); if db::users::set_login_token( &db_conn, |
