Skip to content
Permalink
Browse files

posts: create post in db

  • Loading branch information...
3v0k4 committed Jul 20, 2019
1 parent 7a0735f commit 1ec890d790f08027fc5e58bfa8d3a354d86ab4e0
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Handler/Posts.hs
@@ -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

0 comments on commit 1ec890d

Please sign in to comment.
You can’t perform that action at this time.