diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 13:30:19 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 13:30:19 +0000 |
| commit | af3f5430a0b0f1834228b28fd89848959512e718 (patch) | |
| tree | 27e843c147b92bf09893012f323ddaf54f5eb0a5 /src/models/auth.rs | |
| parent | 385102a5763f667d53a9d8ed2052ccb8c791bc91 (diff) | |
Use configuration for environment variables
Diffstat (limited to 'src/models/auth.rs')
| -rw-r--r-- | src/models/auth.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/models/auth.rs b/src/models/auth.rs index 36a0175..8a70244 100644 --- a/src/models/auth.rs +++ b/src/models/auth.rs @@ -40,7 +40,7 @@ pub struct LoginCredentials { } static KEYS: Lazy<Keys> = Lazy::new(|| { - let secret = std::env::var("JWT_SECRET").expect("JWT_SECRET must be set"); + let secret = &crate::config::CONFIG.jwt_secret; Keys::new(secret.as_bytes()) }); |
