This commit is contained in:
JMARyA 2024-09-11 16:08:58 +02:00
parent f24e3f1e3c
commit 949340a7f2
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 104 additions and 83 deletions

View file

@ -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();