renamed to onErrorHtml

This commit is contained in:
jp.rider63 2013-12-22 22:13:59 -05:00
parent ed0e551d17
commit df9a8136a6

View File

@ -167,8 +167,8 @@ class (Yesod master, PathPiece (AuthId master), RenderMessage master FormMessage
-- | Called on login error for HTTP requests. By default, calls -- | Called on login error for HTTP requests. By default, calls
-- @setMessage@ and redirects to @dest@. -- @setMessage@ and redirects to @dest@.
onError :: (MonadResourceBase m) => Route master -> Text -> HandlerT master m Html onErrorHtml :: (MonadResourceBase m) => Route master -> Text -> HandlerT master m Html
onError dest msg = do onErrorHtml dest msg = do
setMessage $ toHtml msg setMessage $ toHtml msg
fmap asHtml $ redirect dest fmap asHtml $ redirect dest
where where
@ -251,7 +251,7 @@ loginErrorMessage dest msg =
sendResponseStatus unauthorized401 =<< ( sendResponseStatus unauthorized401 =<< (
selectRep $ do selectRep $ do
provideRep $ do provideRep $ do
onError dest msg onErrorHtml dest msg
provideJsonMessage msg provideJsonMessage msg
) )