Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod database;
mod auth_utils;

pub use auth_utils::models::Credentials;
use database::Status;

pub fn authenticate(creds: Credentials){
    if let Status::Connected = database::connect_to_database() {

        let test_cred = Credentials {
            username: "anis".to_ascii_lowercase(),
            password: "pass".to_ascii_lowercase()
        };
        auth_utils::login(test_cred)
    }
}