Logging in and Signing up on the client done

Tons of bug fixes too
This commit is contained in:
2024-10-12 01:28:24 -04:00
Unverified
parent 50c0d6a051
commit dc454ccf3a
18 changed files with 367 additions and 181 deletions

View File

@@ -1,4 +0,0 @@
DATABASE_URL=sqlite:server.db
DOMAIN=server.realmchat.com
SERVER_ID=tester
PORT=5051

4
server/example.env Normal file
View File

@@ -0,0 +1,4 @@
DATABASE_URL=sqlite:server.db
DOMAIN=
SERVER_ID=
PORT=5051

View File

@@ -127,7 +127,7 @@ impl RealmChatServer {
}
async fn is_user_in_server(&self, userid: &str) -> bool {
let result = query!("SELECT NOT EXISTS (SELECT 1 FROM user WHERE userid = ?) AS does_exist", userid).fetch_one(&self.db_pool).await;
let result = query!("SELECT EXISTS (SELECT 1 FROM user WHERE userid = ?) AS does_exist", userid).fetch_one(&self.db_pool).await;
match result {
Ok(record) => record.does_exist != 0,