diff options
author | Lia Lenckowski <lialenck@protonmail.com> | 2023-08-29 01:21:51 +0200 |
---|---|---|
committer | Lia Lenckowski <lialenck@protonmail.com> | 2023-08-29 01:21:51 +0200 |
commit | a07a29ef8f22a96b12f9777fc34c2554e6c201ab (patch) | |
tree | 1ccf5bc23764d07d7988baedcb4f377ccabd7a60 /src/Config.hs | |
parent | ef4c38adb1cbf5479ab5cb67a6ebeaf207168d7f (diff) | |
download | fastbangs-a07a29ef8f22a96b12f9777fc34c2554e6c201ab.tar fastbangs-a07a29ef8f22a96b12f9777fc34c2554e6c201ab.tar.bz2 fastbangs-a07a29ef8f22a96b12f9777fc34c2554e6c201ab.tar.zst |
batched/commulative notifications about pending bangs
Diffstat (limited to 'src/Config.hs')
-rw-r--r-- | src/Config.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Config.hs b/src/Config.hs index 2b2f341..6ffb1fd 100644 --- a/src/Config.hs +++ b/src/Config.hs @@ -30,7 +30,8 @@ data Config = Config { confFavicon :: Text, confUser :: Text, confPwHash :: Text, - confEmailCmd :: Maybe FilePath + confEmailCmd :: Maybe FilePath, + confAdminEmail :: String } deriving (Show, Eq) getConfig :: IO Config @@ -47,6 +48,7 @@ getConfig = do <*> resolveVal (lookup "admin-user" confFile) "ADMIN_USER" "bleb" <*> resolveVal (lookup "admin-pw-hash" confFile) "ADMIN_PW_HASH" "" -- prevent login without manual pw <*> fmap (<|> lookup "email-command" confFile) (lookupEnv "EMAIL_CMD") + <*> resolveVal (lookup "admin-email" confFile) "ADMIN_EMAIL" "" where resolveVal :: IsString s => Maybe String -> String -> String -> IO s resolveVal mayConf q def = do |