diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-10 09:06:41 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-10 09:06:41 -0600 |
| commit | 7c41dfe19aa0ced3b895979ca4e369067fd58da1 (patch) | |
| tree | 2294745c404d7a17adc9d11157d9300cf319b536 /src/http/mod.rs | |
| parent | 50867b812214d9454f27d3153cf36d969a7d6c95 (diff) | |
refactor: pass config into server ctor
Diffstat (limited to 'src/http/mod.rs')
| -rw-r--r-- | src/http/mod.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 11887ae..6ab840d 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -12,11 +12,7 @@ pub struct Server { } impl Server { - pub fn new(addr: String) -> Result<Server, Box<dyn std::error::Error>> { - let mut config = Config::from_env(); - config.bind_addr = addr; - config.issuer_url = format!("http://{}", config.bind_addr); - + pub fn new(config: Config) -> Result<Server, Box<dyn std::error::Error>> { Ok(Server { oauth_server: OAuthServer::new(&config)?, config, |
