Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
posts: order id descending
  • Loading branch information
3v0k4 committed Jul 20, 2019
1 parent b90b5cc commit 716817e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Handler/Posts.hs
Expand Up @@ -18,14 +18,14 @@ postForm =
getPostsR :: Handler Html
getPostsR = do
(widget, enctype) <- generateFormPost postForm
allPosts :: [Entity Post] <- runDB $ selectList [] []
allPosts :: [Entity Post] <- runDB $ selectList [] [ Desc PostId ]
emptyLayout $ do
$(widgetFile "posts")

postPostsR :: Handler Html
postPostsR = do
((result, widget), enctype) <- runFormPost postForm
allPosts :: [Entity Post] <- runDB $ selectList [] []
allPosts :: [Entity Post] <- runDB $ selectList [] [ Desc PostId ]
case result of
FormSuccess post -> do
_ <- runDB $ insert post
Expand Down

0 comments on commit 716817e

Please sign in to comment.