This commit is contained in:
Paul Makles
2020-01-19 14:22:52 +00:00
parent 8c41a0d00c
commit 56631f99b2
9 changed files with 754 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
use mongodb::Client;
use mongodb::{ Client, Database };
use std::env;
use once_cell::sync::OnceCell;
@@ -15,3 +15,7 @@ pub fn connect() {
pub fn get_connection() -> &'static Client {
DBCONN.get().unwrap()
}
pub fn get_db() -> Database {
get_connection().database("revolt")
}