1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(dead_code, unused_variables)]
use rand::prelude::*;

mod database;
mod auth_utils;

pub use auth_utils::models::Credentials;

pub fn authenticate(creds: auth_utils::models::Credentials) {
    let timout = thread_rng().gen_range(100..500);
    println!("the time out is {}", timout);
    if let database::Status::Connected = database::connect_to_database() {
        auth_utils::login(creds);
    }
}