Commit 3a9b15c0 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] encoding update node

parent 37dccfd7
...@@ -34,8 +34,6 @@ import Test.QuickCheck.Arbitrary ...@@ -34,8 +34,6 @@ import Test.QuickCheck.Arbitrary
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Control.Concurrent (threadDelay) import Control.Concurrent (threadDelay)
------------------------------------------------------------------------ ------------------------------------------------------------------------
data UpdateNodeParams = UpdateNodeParamsList { methodList :: Method } data UpdateNodeParams = UpdateNodeParamsList { methodList :: Method }
| UpdateNodeParamsGraph { methodGraph :: GraphMetric } | UpdateNodeParamsGraph { methodGraph :: GraphMetric }
...@@ -61,8 +59,12 @@ data Charts = Sources | Authors | Institutes | Ngrams | All ...@@ -61,8 +59,12 @@ data Charts = Sources | Authors | Institutes | Ngrams | All
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- TODO unPrefix "pn_" FromJSON, ToJSON, ToSchema, adapt frontend. -- TODO unPrefix "pn_" FromJSON, ToJSON, ToSchema, adapt frontend.
instance FromJSON UpdateNodeParams instance FromJSON UpdateNodeParams where
instance ToJSON UpdateNodeParams parseJSON = genericParseJSON (defaultOptions { sumEncoding = ObjectWithSingleField })
instance ToJSON UpdateNodeParams where
toJSON = genericToJSON (defaultOptions { sumEncoding = ObjectWithSingleField })
instance ToSchema UpdateNodeParams instance ToSchema UpdateNodeParams
instance Arbitrary UpdateNodeParams where instance Arbitrary UpdateNodeParams where
arbitrary = do arbitrary = do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment