diff options
author | Joris | 2024-06-02 12:53:20 +0200 |
---|---|---|
committer | Joris | 2024-06-02 12:53:20 +0200 |
commit | 0d5ec3626773edb7d32884c594230c7cc03ae0e7 (patch) | |
tree | 768b6d6fee0b5409c7a12f5aa7b191a25ca5f2d7 /src/db/users.rs | |
parent | 76a761630a8e6f5686d7e4384948ed949f702f3b (diff) |
Simplify logging initmain
Diffstat (limited to 'src/db/users.rs')
-rw-r--r-- | src/db/users.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/db/users.rs b/src/db/users.rs index 82326a9..f463421 100644 --- a/src/db/users.rs +++ b/src/db/users.rs @@ -23,7 +23,7 @@ ORDER BY match res { Ok(users) => users, Err(err) => { - error!("Error listing users: {:?}", err); + log::error!("Error listing users: {:?}", err); vec![] } } @@ -53,7 +53,7 @@ WHERE match res { Ok(_) => true, Err(err) => { - error!("Error updating login token: {:?}", err); + log::error!("Error updating login token: {:?}", err); false } } @@ -78,7 +78,7 @@ WHERE match res { Ok(_) => true, Err(err) => { - error!("Error removing login token: {:?}", err); + log::error!("Error removing login token: {:?}", err); false } } @@ -91,7 +91,7 @@ pub async fn get_by_login_token( let res = sqlx::query_as::<_, User>( r#" SELECT - id, + id, name, email FROM @@ -108,7 +108,7 @@ WHERE Ok(user) => Some(user), Err(Error::RowNotFound) => None, Err(err) => { - error!("Error getting user from login token: {:?}", err); + log::error!("Error getting user from login token: {:?}", err); None } } @@ -137,7 +137,7 @@ WHERE Ok(hash) => Some(hash), Err(Error::RowNotFound) => None, Err(err) => { - error!("Error getting password hash: {:?}", err); + log::error!("Error getting password hash: {:?}", err); None } } |