trim name of new user name #479

Merged
philipp merged 1 commits from trim-new-user-names into main 2024-05-04 18:36:01 +02:00
Showing only changes of commit 1d9adf071f - Show all commits

View File

@ -450,6 +450,7 @@ ORDER BY last_access DESC
} }
pub async fn create(db: &SqlitePool, name: &str) -> bool { pub async fn create(db: &SqlitePool, name: &str) -> bool {
let name = name.trim();
sqlx::query!("INSERT INTO USER(name) VALUES (?)", name) sqlx::query!("INSERT INTO USER(name) VALUES (?)", name)
.execute(db) .execute(db)
.await .await