fixup! servant-server: add spec for QueryString and DeepQuery
This commit is contained in:
parent
35ac209c91
commit
c45002a021
1 changed files with 1 additions and 1 deletions
|
@ -330,7 +330,7 @@ data Filter = Filter
|
||||||
deriving Show
|
deriving Show
|
||||||
|
|
||||||
instance FromDeepQuery Filter where
|
instance FromDeepQuery Filter where
|
||||||
fromDeepQuery params = traceShowId $ do
|
fromDeepQuery params = do
|
||||||
let maybeToRight l = maybe (Left l) Right
|
let maybeToRight l = maybe (Left l) Right
|
||||||
age' <- maybeToRight "missing age" $ readMaybe . T.unpack =<< join (lookup ["age"] params)
|
age' <- maybeToRight "missing age" $ readMaybe . T.unpack =<< join (lookup ["age"] params)
|
||||||
name' <- maybeToRight "missing name" $ join $ lookup ["name"] params
|
name' <- maybeToRight "missing name" $ join $ lookup ["name"] params
|
||||||
|
|
Loading…
Reference in a new issue