Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
posts: create post in db
  • Loading branch information
3v0k4 committed Jul 20, 2019
1 parent 7a0735f commit 1ec890d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Handler/Posts.hs
Expand Up @@ -27,7 +27,8 @@ postPostsR = do
((result, widget), enctype) <- runFormPost postForm
allPosts :: [Entity Post] <- runDB $ selectList [] []
case result of
FormSuccess _ ->
FormSuccess post -> do
_ <- runDB $ insert post
redirect PostsR
_ ->
emptyLayout $ do
Expand Down

0 comments on commit 1ec890d

Please sign in to comment.