parseJsonBody_ deprecated for requireJsonBody
This commit is contained in:
parent
8535f19583
commit
5c3078b51e
@ -19,7 +19,7 @@ instance Yesod App
|
||||
|
||||
getHomeR :: Handler RepPlain
|
||||
getHomeR = do
|
||||
val <- parseJsonBody_
|
||||
val <- requireJsonBody
|
||||
case Map.lookup ("foo" :: Text) val of
|
||||
Nothing -> invalidArgs ["foo not found"]
|
||||
Just foo -> return $ RepPlain $ toContent (foo :: Text)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user