Use redirect instaed of rendering
This commit is contained in:
parent
18963c6084
commit
3dd1f24658
1 changed files with 1 additions and 3 deletions
|
@ -64,8 +64,7 @@ scottySite = do
|
|||
polls <- liftIO $ allPolls
|
||||
blaze $ Noodle.Views.Index.render $ pollNames $ polls
|
||||
S.get "/" $ do
|
||||
polls <- liftIO $ allPolls
|
||||
blaze $ Noodle.Views.Index.render $ pollNames $ polls
|
||||
S.redirect "/polls"
|
||||
S.get "/polls/new" $ do
|
||||
blaze $ Noodle.Views.New.render []
|
||||
S.post "/options/delete" $ do
|
||||
|
@ -84,7 +83,6 @@ scottySite = do
|
|||
let choosen_opt_ids = foldl (\ acc (key, value) -> if key == "option_id"
|
||||
then (T.unpack value):acc
|
||||
else acc) [] all_params
|
||||
|
||||
case name of
|
||||
"" -> showAction id ["Vote needs a name"]
|
||||
otherwise -> do
|
||||
|
|
Loading…
Reference in a new issue