aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/app/Page/ListCollection.hs
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/Page/ListCollection.hs')
-rw-r--r--frontend/app/Page/ListCollection.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/app/Page/ListCollection.hs b/frontend/app/Page/ListCollection.hs
index 47a4649..6b999f0 100644
--- a/frontend/app/Page/ListCollection.hs
+++ b/frontend/app/Page/ListCollection.hs
@@ -13,18 +13,18 @@ import Data.Aeson qualified as A
import Data.Aeson.KeyMap qualified as AM
import Effect (Eff)
import Miso
-import Miso.String (MisoString)
import Schema
+import Collection
data Model = Model
- { collection :: MisoString,
+ { collection :: Collection,
input :: A.Object,
schema :: Schema,
posts :: [A.Object]
}
deriving (Show, Eq)
-initialModel :: MisoString -> JSM (Either SomeException Model)
+initialModel :: Collection -> JSM (Either SomeException Model)
initialModel collection = do
schema' <- try (API.REST.Collection.schema collection)
posts' <- try (API.REST.Collection.list collection)
@@ -42,7 +42,7 @@ viewModel :: Model -> View Action
viewModel m =
div_ [] $
[ h3_ [] [text "entities"],
- schemaTable m.collection m.schema m.posts,
+ schemaTable m.collection.name m.schema m.posts,
h3_ [] [text "schema"],
viewSchema m.schema
]