fix RootR -> HomeR
This commit is contained in:
parent
2baeddd698
commit
2bb39530d6
@ -14,16 +14,16 @@ getHomeR :: Handler RepHtml
|
||||
getHomeR = do
|
||||
((_, formWidget), formEnctype) <- generateFormPost sampleForm
|
||||
let submission = Nothing :: Maybe (FileInfo, Text)
|
||||
handlerName = "getRootR" :: Text
|
||||
handlerName = "getHomeR" :: Text
|
||||
defaultLayout $ do
|
||||
aDomId <- lift newIdent
|
||||
setTitle "Welcome To Yesod!"
|
||||
$(widgetFile "homepage")
|
||||
|
||||
postRootR :: Handler RepHtml
|
||||
postRootR = do
|
||||
postHomeR :: Handler RepHtml
|
||||
postHomeR = do
|
||||
((result, formWidget), formEnctype) <- runFormPost sampleForm
|
||||
let handlerName = "postRootR" :: Text
|
||||
let handlerName = "postHomeR" :: Text
|
||||
submission = case result of
|
||||
FormSuccess res -> Just res
|
||||
_ -> Nothing
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
$maybe (info,con) <- submission
|
||||
<div .message>
|
||||
Your file's type was <em>#{fileContentType info}</em>. You say it has: <em>#{con}</em>
|
||||
<form method=post action=@{RootR}#form enctype=#{formEnctype}>
|
||||
<form method=post action=@{HomeR}#form enctype=#{formEnctype}>
|
||||
^{formWidget}
|
||||
<input type="submit" value="Send it!">
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user