Skip to content

Commit

Permalink
Merge pull request #233 from adamreese/fix/embedded-db-flag
Browse files Browse the repository at this point in the history
Don't require a value passed for the --use-embedded-db
  • Loading branch information
adamreese authored Sep 10, 2021
2 parents 9edc12b + 633c99c commit 7f458e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ struct Opts {
env = "BINDLE_USE_EMBEDDED_DB",
about = "Use the new embedded database provider. This is currently experimental, but fairly stable and more efficient. In the future, this will be the default"
)]
use_embedded_db: Option<bool>,
#[serde(default)]
use_embedded_db: bool,

#[clap(
name = "htpasswd-file",
Expand Down Expand Up @@ -281,8 +282,7 @@ async fn main() -> anyhow::Result<()> {
// similar issues (though I think it could be fixed, it would be a lot of code). So we might
// have to resort to some sort of dependency injection here. The same goes for providers as the
// methods have generic parameters
let use_embedded_db = opts.use_embedded_db.unwrap_or_default();
match (use_embedded_db, auth_method) {
match (opts.use_embedded_db, auth_method) {
// Embedded DB and oidc auth
(true, AuthType::Oidc(client_id, issuer, token_url)) => {
warn!("Using EmbeddedProvider. This is currently experimental");
Expand Down

0 comments on commit 7f458e6

Please sign in to comment.