We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 428a8513 authored by wolftune's avatar wolftune

fixed order for the approve entry

parent 625542e7
......@@ -441,6 +441,28 @@ getProjectCommentR project_handle comment_id = do
defaultLayout $(widgetFile "project_discussion_wrapper")
--------------------------------------------------------------------------------
-- /c/#CommentId/approve
getApproveProjectCommentR :: Text -> CommentId -> Handler Html
getApproveProjectCommentR project_handle comment_id = do
(widget, _) <-
makeProjectCommentActionWidget
makeApproveCommentWidget
project_handle
comment_id
def
getMaxDepth
defaultLayout $(widgetFile "project_discussion_wrapper")
postApproveProjectCommentR :: Text -> CommentId -> Handler Html
postApproveProjectCommentR project_handle comment_id = do
(user@(Entity user_id _), _, comment) <- checkCommentRequireAuth project_handle comment_id
checkProjectCommentActionPermission can_approve user project_handle (Entity comment_id comment)
postApproveComment user_id comment_id comment
redirect (ProjectCommentR project_handle comment_id)
--------------------------------------------------------------------------------
-- /c/#CommentId/close
......@@ -547,28 +569,6 @@ postFlagProjectCommentR project_handle comment_id = do
Nothing -> redirect (ProjectDiscussionR project_handle)
Just widget -> defaultLayout $(widgetFile "project_discussion_wrapper")
--------------------------------------------------------------------------------
-- /approve
getApproveProjectCommentR :: Text -> CommentId -> Handler Html
getApproveProjectCommentR project_handle comment_id = do
(widget, _) <-
makeProjectCommentActionWidget
makeApproveCommentWidget
project_handle
comment_id
def
getMaxDepth
defaultLayout $(widgetFile "project_discussion_wrapper")
postApproveProjectCommentR :: Text -> CommentId -> Handler Html
postApproveProjectCommentR project_handle comment_id = do
(user@(Entity user_id _), _, comment) <- checkCommentRequireAuth project_handle comment_id
checkProjectCommentActionPermission can_approve user project_handle (Entity comment_id comment)
postApproveComment user_id comment_id comment
redirect (ProjectCommentR project_handle comment_id)
--------------------------------------------------------------------------------
-- /c/#CommentId/reply
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment