forked from jmug/stoatchat
feat: use auto db configuration
This commit is contained in:
12
Cargo.lock
generated
12
Cargo.lock
generated
@@ -166,6 +166,17 @@ dependencies = [
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-recursion"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2cda8f4bcc10624c4e85bc66b3f452cca98cfa5ca002dc83a16aad2367641bea"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-std"
|
||||
version = "1.10.0"
|
||||
@@ -2981,6 +2992,7 @@ dependencies = [
|
||||
name = "revolt-quark"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-recursion",
|
||||
"async-std",
|
||||
"async-trait",
|
||||
"bincode",
|
||||
|
||||
@@ -121,10 +121,7 @@ async fn launch_web() {
|
||||
};
|
||||
}
|
||||
|
||||
let db = DatabaseInfo::MongoDb("mongodb://localhost")
|
||||
.connect()
|
||||
.await
|
||||
.unwrap();
|
||||
let db = DatabaseInfo::Auto.connect().await.unwrap();
|
||||
db.migrate_database().await.unwrap();
|
||||
|
||||
let mongo_db = mongodb::Client::with_uri_str("mongodb://localhost")
|
||||
|
||||
Reference in New Issue
Block a user