summaryrefslogtreecommitdiff
path: root/lore/Biz/Ibb/Move.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lore/Biz/Ibb/Move.hs')
-rw-r--r--lore/Biz/Ibb/Move.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/lore/Biz/Ibb/Move.hs b/lore/Biz/Ibb/Move.hs
index 291e015..ea3904d 100644
--- a/lore/Biz/Ibb/Move.hs
+++ b/lore/Biz/Ibb/Move.hs
@@ -16,6 +16,7 @@ import Biz.Ibb.Core as Core
import JavaScript.Web.XMLHttpRequest (Request(..), Method(GET), RequestData(NoData), contents, xhrByteString)
import Miso
import Miso.String
+import Network.RemoteData
move :: Action -> Model -> Effect Action Model
move Nop m = noEff m
@@ -29,9 +30,9 @@ fetchPeople = do
mjson <- contents /@ xhrByteString req
case mjson of
Nothing -> pure $ Failure "could not read from server"
- Just json -> pure
- $ either (Failure . ms) Core.Success
- $ eitherDecodeStrict json
+ Just a -> pure
+ $ either (Failure . ms) Network.RemoteData.Success
+ $ eitherDecodeStrict a
where
req = Request { reqMethod = GET
, reqURI = "/api/people" -- FIXME: can replace this hardcoding with a function?