fix
This commit is contained in:
parent
f24e3f1e3c
commit
949340a7f2
2 changed files with 104 additions and 83 deletions
|
@ -57,7 +57,7 @@ macro_rules! get_mongo {
|
|||
if let Some(client) = $crate::MONGO_CLIENT.get() {
|
||||
client
|
||||
} else {
|
||||
let client = mongodb::Client::with_uri_str(&std::env::var("DB_URI").unwrap())
|
||||
let client = $crate::mongodb::Client::with_uri_str(&std::env::var("DB_URI").unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
$crate::MONGO_CLIENT.set(client).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue