pub async fn find_by_auth( id: &str , password: &str ) -> Option<UserResponse> {
    println!("[DEBUG] find_by_auth ");
    println!("id : {}", id);
    println!("password : {}", password);
    let coll = database::collection("users");
    let query = doc! { "uid" : id.to_string(), "password" : password.to_string() };
    let cursor = coll.find_one(query, None).unwrap();
    cursor.map(|x| doc_to_model(&x))
}
/// Find User by id and password info
Find User by id and password info
Find User by id and password info
pub async fn find_by_auth( id: &str , password: &str ) -> Option<UserResponse> {
    println!("[DEBUG] find_by_auth ");
    println!("id : {}", id);
    println!("password : {}", password);
    let coll = database::collection("users");
    let query = doc! { "uid" : id.to_string(), "password" : password.to_string() };
    let cursor = coll.find_one(query, None).unwrap();
    cursor.map(|x| doc_to_model(&x))
}
pub async fn find_by_auth ( id : & str , password : & str ) -> Option < UserResponse > { println ! ( " " ) ; println ! ( " " id ) ; println ! ( " " password ) ; let coll = database :: collection ( " " ) ; let query = doc ! { " " id to_string ( ) " " password to_string ( ) } ; let cursor = coll . find_one ( query , None ) . unwrap ( ) ; cursor . map ( | x | doc_to_model ( & x ) ) }
Find User by id and password info
Find User by id and password info
id
&str
password
&str