From a07a29ef8f22a96b12f9777fc34c2554e6c201ab Mon Sep 17 00:00:00 2001 From: Lia Lenckowski Date: Tue, 29 Aug 2023 01:21:51 +0200 Subject: batched/commulative notifications about pending bangs --- src/Config.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Config.hs') 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 -- cgit v1.2.3-70-g09d2