runInputPostResult is the modified method
This commit is contained in:
parent
12897ae5a0
commit
a417b95a98
@ -67,10 +67,20 @@ toMap = Map.unionsWith (++) . map (\(x, y) -> Map.singleton x [y])
|
||||
|
||||
runInputPost :: MonadHandler m => FormInput m a -> m (FormResult a)
|
||||
runInputPost (FormInput f) = do
|
||||
(env, fenv) <- liftM (toMap *** toMap) runRequestBody
|
||||
m <- getYesod
|
||||
l <- languages
|
||||
emx <- f m l env fenv
|
||||
case emx of
|
||||
Left errs -> invalidArgs $ errs []
|
||||
Right x -> return x
|
||||
|
||||
runInputPostResult :: MonadHandler m => FormInput m a -> m (FormResult a)
|
||||
runInputPostResult (FormInput f) = do
|
||||
(env, fenv) <- liftM (toMap *** toMap) runRequestBody
|
||||
m <- getYesod
|
||||
l <- languages
|
||||
emx <- f m l env fenv
|
||||
case emx of
|
||||
Left errs -> return $ FormFailure (errs [])
|
||||
Right x -> return (FormSuccess x)
|
||||
Right x -> return $ FormSuccess x
|
||||
|
||||
Loading…
Reference in New Issue
Block a user