Fix db insert
This commit is contained in:
parent
efcfff55e0
commit
78c6fbc4a7
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ impl Db {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn insert_user(&self, username: String) -> Result<()> {
|
pub async fn insert_user(&self, username: String) -> Result<()> {
|
||||||
if !username.is_empty() && username.chars().all(char::is_alphabetic) {
|
if !username.is_empty() && username.chars().all(char::is_alphanumeric) {
|
||||||
self.users.write().await.push(username);
|
self.users.write().await.push(username);
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue