From b4800d051a71b38cce8dc0ee89edc0742f272384 Mon Sep 17 00:00:00 2001 From: Lia Lenckowski Date: Sat, 26 Aug 2023 19:16:57 +0200 Subject: refactor: move PendingBang out of Main --- src/BangState.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/BangState.hs') diff --git a/src/BangState.hs b/src/BangState.hs index fc3afab..1b76649 100644 --- a/src/BangState.hs +++ b/src/BangState.hs @@ -69,8 +69,8 @@ loadOwnBangs = eitherDecodeFileStrict "bangs.json" <|> return (Left "") >>= \cas -- also spawns a thread for disk synchronization initBangState :: IO BangState initBangState = do - -- TODO error handling for ddg bang polling, as well as regular polling - ans <- httpJSON "https://duckduckgo.com/bang.v260.js" :: IO (Response DDGBangs) + -- we may want to actually poll this. oops. + ans <- httpJSON "https://duckduckgo.com/bang.js" :: IO (Response DDGBangs) s <- BangState <$> (loadOwnBangs >>= newTVarIO) <*> newTVarIO (toBangs $ getResponseBody ans) -- cgit v1.2.3-70-g09d2