Merge branch 'main' of gitlab.com:PhilippHofer/rot

This commit is contained in:
Philipp 2023-07-11 14:37:59 +02:00
commit 71ac00ec36

View File

@ -111,6 +111,7 @@ ORDER BY last_access DESC
pub async fn login(db: &SqlitePool, name: &str, pw: &str) -> Result<Self, LoginError> {
info!("User '{name}' is trying to login...");
let name = name.trim(); // just to make sure...
let Some(user) = User::find_by_name(db, name).await else {
info!("Username ({name}) not found");
return Err(LoginError::InvalidAuthenticationCombo); // Username not found