aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/app/Page/EditValue.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-10-13 11:55:20 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-10-13 11:55:20 +0200
commite66534eefb5979c1ec5e0a28e9c29969ae2c9884 (patch)
tree3b919222ab147741cb9332537997e590b104eb01 /frontend/app/Page/EditValue.hs
parent997442c6b99bef99c429d4ab7f676fdf9ae09096 (diff)
improve REST API
Diffstat (limited to 'frontend/app/Page/EditValue.hs')
-rw-r--r--frontend/app/Page/EditValue.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/frontend/app/Page/EditValue.hs b/frontend/app/Page/EditValue.hs
index 7945874..942d9db 100644
--- a/frontend/app/Page/EditValue.hs
+++ b/frontend/app/Page/EditValue.hs
@@ -11,13 +11,11 @@ import ACMS.API.REST.Collection qualified as API.REST.Collection
import Control.Monad.Catch (SomeException, try)
import Data.Aeson qualified as A
import Data.Aeson.KeyMap qualified as AM
-import Data.ByteString.Lazy.UTF8 qualified as LB
import Data.Maybe
import Effect (Eff)
import Form qualified as F
import Miso
import Miso.String (toMisoString)
-import Safe (headMay)
import Schema
import Collection
@@ -31,7 +29,7 @@ data Model = Model
initialModel :: CollectionItem -> JSM (Either SomeException Model)
initialModel collectionItem = do
schema' <- try (API.REST.Collection.schema collectionItem.collection)
- input' <- try (headMay <$> API.REST.Collection.read collectionItem)
+ input' <- try (API.REST.Collection.read collectionItem)
pure do
schema <- schema'
input <- input'