From 28290ac9e4aaed9a605bfec734818c28dd4ff51a Mon Sep 17 00:00:00 2001 From: Lia Lenckowski Date: Sun, 20 Aug 2023 20:25:32 +0200 Subject: make admin user/password configurable with env vars instead of recompilation --- src/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 3474040..540db63 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -130,7 +130,7 @@ getOpenSearchR = do postVerdictR :: Bool -> Handler () postVerdictR b = do - ensureAuth + ensureAuth . config =<< getYesod (PendingBang n u dp mayEm) <- requireCheckJsonBody -- NOTE: known race condition: the bang bang may be deleted from the database @@ -148,7 +148,7 @@ postRejectR = postVerdictR False getPendingR :: Handler Value getPendingR = do - ensureAuth + ensureAuth . config =<< getYesod pendingBangs <- runDB $ selectList [] [] return $ toJSON $ map entityVal (pendingBangs :: [Entity PendingBang]) -- cgit v1.2.3-70-g09d2