postBlogPost :: SpockAction DB.Pipe session state ()
postBlogPost = do
  maybeBlogPost <- blogPostFromPOST
  case maybeBlogPost of
    Nothing -> do
      lucid (p_ "A blog post was not submitted.")
      setStatus status400
    Just blogPost -> do
      runQuery (insertBlogPost blogPost)
      redirect "/"
postBlogPost :: SpockAction DB.Pipe session state ()
postBlogPost = do
  maybeBlogPost <- blogPostFromPOST
  case maybeBlogPost of
    Nothing -> do
      lucid (p_ "A blog post was not submitted.")
      setStatus status400
    Just blogPost -> do
      runQuery (insertBlogPost blogPost)
      redirect "/"
postBlogPost = do
  maybeBlogPost <- blogPostFromPOST
  case maybeBlogPost of
    Nothing -> do
      lucid (p_ "A blog post was not submitted.")
      setStatus status400
    Just blogPost -> do
      runQuery (insertBlogPost blogPost)
      redirect "/"