diff options
Diffstat (limited to 'src/server/state/mod.rs')
| -rw-r--r-- | src/server/state/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/state/mod.rs b/src/server/state/mod.rs index 03e8c70..c86052d 100644 --- a/src/server/state/mod.rs +++ b/src/server/state/mod.rs @@ -6,19 +6,20 @@ use std::sync::Arc; #[cfg(feature = "oauth-discord")] use url::Url; +use crate::{config::Config, server::driver::SellershutDriver}; #[cfg(feature = "oauth-discord")] use crate::{config::DiscordOauth, server::driver::auth::OauthClient}; -use crate::{config::Config, server::driver::SellershutDriver}; #[derive(Clone)] pub struct AppState { - driver: Arc<dyn SellershutDriver>, + pub driver: Arc<dyn SellershutDriver>, #[cfg(feature = "oauth-discord")] pub oauth_discord: OauthClient, } impl AppState { pub async fn new(config: &Config, driver: impl SellershutDriver) -> anyhow::Result<Self> { + dbg!(&config); Ok(Self { driver: Arc::new(driver), #[cfg(feature = "oauth-discord")] @@ -30,6 +31,7 @@ impl AppState { #[cfg(feature = "oauth-discord")] fn discord_client(disc: &DiscordOauth, redirect: &Url) -> anyhow::Result<OauthClient> { use crate::server::driver::{self, auth::ClientOptions}; + dbg!(&disc); let discord_opts = ClientOptions::builder() .client_id(disc.client_id.to_owned()) |
