From 1d9adf071f7424b094ded056d0b8af0c6916a4d3 Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 4 May 2024 18:19:07 +0200 Subject: [PATCH] trim name of new user name --- src/model/user.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/model/user.rs b/src/model/user.rs index bb540aa..ff14443 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -450,6 +450,7 @@ ORDER BY last_access DESC } pub async fn create(db: &SqlitePool, name: &str) -> bool { + let name = name.trim(); sqlx::query!("INSERT INTO USER(name) VALUES (?)", name) .execute(db) .await -- 2.45.2