diff options
author | Lia Lenckowski <lialenck@protonmail.com> | 2023-08-26 19:16:57 +0200 |
---|---|---|
committer | Lia Lenckowski <lialenck@protonmail.com> | 2023-08-26 19:16:57 +0200 |
commit | b4800d051a71b38cce8dc0ee89edc0742f272384 (patch) | |
tree | 0b0b05d36f09a9ece0dbe58ee7404e5f866fd3e1 /src/BangState.hs | |
parent | a68afb81885ffdf0d6fe58df5aee57d7e7653ee9 (diff) | |
download | fastbangs-b4800d051a71b38cce8dc0ee89edc0742f272384.tar fastbangs-b4800d051a71b38cce8dc0ee89edc0742f272384.tar.bz2 fastbangs-b4800d051a71b38cce8dc0ee89edc0742f272384.tar.zst |
refactor: move PendingBang out of Main
Diffstat (limited to 'src/BangState.hs')
-rw-r--r-- | src/BangState.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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) |