diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index 13e804a..5de40dd 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -1558,16 +1558,32 @@ def fork_edit_file( namespace=namespace)) +_REACTION_URL_SNIPPET = ( + 'pull-request//comment//react' +) + + +@UI_NS.route( + '//%s/' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '//pull-request//comment//react', methods=['POST']) + '//%s' % _REACTION_URL_SNIPPET, methods=['POST']) +@UI_NS.route( + '///%s/' % _REACTION_URL_SNIPPET, + methods=['POST']) +@UI_NS.route( + '///%s' % _REACTION_URL_SNIPPET, + methods=['POST']) +@UI_NS.route( + '/fork///%s/' % _REACTION_URL_SNIPPET, + methods=['POST']) @UI_NS.route( - '///pull-request//comment//react', + '/fork///%s' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '/fork///pull-request//comment//react', + '/fork////%s/' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '/fork////pull-request//comment//react', + '/fork////%s' % _REACTION_URL_SNIPPET, methods=['POST']) @login_required def pull_request_comment_add_reaction(repo, requestid, commentid, diff --git a/pagure/ui/issues.py b/pagure/ui/issues.py index a46b60b..0e3d29a 100644 --- a/pagure/ui/issues.py +++ b/pagure/ui/issues.py @@ -365,29 +365,32 @@ def update_issue(repo, issueid, username=None, namespace=None): ) +_REACTION_URL_SNIPPET = 'issue//comment//react' + + @UI_NS.route( - '//issue//comment//react/', + '//%s/' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '//issue//comment//react', + '//%s' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '///issue//comment//react/', + '///%s/' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '///issue//comment//react', + '///%s' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '/fork///issue//comment//react/', + '/fork///%s/' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '/fork///issue//comment//react', + '/fork///%s' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '/fork////issue//comment//react/', + '/fork////%s/' % _REACTION_URL_SNIPPET, methods=['POST']) @UI_NS.route( - '/fork////issue//comment//react', + '/fork////%s' % _REACTION_URL_SNIPPET, methods=['POST']) @login_required @has_issue_tracker