aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/cli.rs')
-rw-r--r--src/config/cli.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/config/cli.rs b/src/config/cli.rs
index 7bc6312..be1b913 100644
--- a/src/config/cli.rs
+++ b/src/config/cli.rs
@@ -1,6 +1,8 @@
use std::path::PathBuf;
use clap::Parser;
+#[cfg(feature = "oauth-discord")]
+use secrecy::SecretString;
use serde::Deserialize;
use url::Url;
@@ -48,7 +50,7 @@ pub struct Cli {
/// Oauth optionas
#[command(flatten)]
#[cfg(feature = "oauth")]
- pub oauth: Option<OAuth>,
+ pub oauth: OAuth,
}
#[derive(Debug, Clone, Parser, Deserialize)]
@@ -61,12 +63,12 @@ pub struct OAuth {
}
#[cfg(feature = "oauth-discord")]
-#[derive(Debug, Clone, Parser, Deserialize)]
+#[derive(Debug, Clone, Parser, Deserialize, Default)]
pub struct DiscordOauth {
#[arg(long, env = "OAUTH_DISCORD_CLIENT_ID")]
discord_client_id: Option<String>,
#[arg(long, env = "OAUTH_DISCORD_CLIENT_SECRET")]
- discord_client_secret: Option<String>,
+ discord_client_secret: Option<SecretString>,
#[arg(
long,
env = "OAUTH_DISCORD_TOKEN_URL",