- fix: issue where login failed to return the user if their role was null

- add: register route for api-service
- update: spawn a thread for the rest api in the api service
This commit is contained in:
2024-12-17 04:06:56 -05:00
parent 52455d6ffc
commit c67cdd5b2a
8 changed files with 74 additions and 23 deletions

View File

@@ -21,7 +21,6 @@ pub fn verify_password(password: &str, hash: &str) -> bool {
pub async fn verify_user<T: DatabaseClientTrait>(mut db_client: T,
username: &str, password: &str) -> Option<String> {
// Placeholder: Replace with a gRPC call to the Database Service
let user = db_client.get_user_by_username(username).await.ok()?;
if verify_password(password, &user.hashed_password) {