mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
fix: set db type when overriding with DATABASE_URL
This commit is contained in:
@@ -175,6 +175,9 @@ impl Settings {
|
||||
Ok(val) => {
|
||||
let url = Url::parse(&val).expect("couldn't parse Database URL");
|
||||
s.set("database.url", url.to_string()).unwrap();
|
||||
let database_type = DBType::from_url(&url).unwrap();
|
||||
s.set("database.database_type", database_type.to_string())
|
||||
.unwrap();
|
||||
}
|
||||
Err(e) => {
|
||||
set_database_url(&mut s);
|
||||
|
||||
Reference in New Issue
Block a user