|
|
@ -159,7 +159,7 @@ def delete_comment(request: Request) -> dict: |
|
|
permission='vote', |
|
|
permission='vote', |
|
|
renderer='comment_contents.jinja2', |
|
|
renderer='comment_contents.jinja2', |
|
|
) |
|
|
) |
|
|
def vote_comment(request: Request) -> dict: |
|
|
|
|
|
|
|
|
def put_vote_comment(request: Request) -> dict: |
|
|
"""Vote on a comment with Intercooler.""" |
|
|
"""Vote on a comment with Intercooler.""" |
|
|
comment = request.context |
|
|
comment = request.context |
|
|
|
|
|
|
|
|
@ -194,7 +194,7 @@ def vote_comment(request: Request) -> dict: |
|
|
permission='vote', |
|
|
permission='vote', |
|
|
renderer='comment_contents.jinja2', |
|
|
renderer='comment_contents.jinja2', |
|
|
) |
|
|
) |
|
|
def unvote_comment(request: Request) -> dict: |
|
|
|
|
|
|
|
|
def delete_vote_comment(request: Request) -> dict: |
|
|
"""Remove the user's vote from a comment with Intercooler.""" |
|
|
"""Remove the user's vote from a comment with Intercooler.""" |
|
|
comment = request.context |
|
|
comment = request.context |
|
|
|
|
|
|
|
|
@ -224,7 +224,7 @@ def unvote_comment(request: Request) -> dict: |
|
|
renderer='comment_contents.jinja2', |
|
|
renderer='comment_contents.jinja2', |
|
|
) |
|
|
) |
|
|
@use_kwargs(CommentTagSchema(only=('name',)), locations=('matchdict',)) |
|
|
@use_kwargs(CommentTagSchema(only=('name',)), locations=('matchdict',)) |
|
|
def tag_comment(request: Request, name: CommentTagOption) -> Response: |
|
|
|
|
|
|
|
|
def put_tag_comment(request: Request, name: CommentTagOption) -> Response: |
|
|
"""Add a tag to a comment.""" |
|
|
"""Add a tag to a comment.""" |
|
|
comment = request.context |
|
|
comment = request.context |
|
|
|
|
|
|
|
|
@ -259,7 +259,7 @@ def tag_comment(request: Request, name: CommentTagOption) -> Response: |
|
|
renderer='comment_contents.jinja2', |
|
|
renderer='comment_contents.jinja2', |
|
|
) |
|
|
) |
|
|
@use_kwargs(CommentTagSchema(only=('name',)), locations=('matchdict',)) |
|
|
@use_kwargs(CommentTagSchema(only=('name',)), locations=('matchdict',)) |
|
|
def untag_comment(request: Request, name: CommentTagOption) -> Response: |
|
|
|
|
|
|
|
|
def delete_tag_comment(request: Request, name: CommentTagOption) -> Response: |
|
|
"""Remove a tag (that the user previously added) from a comment.""" |
|
|
"""Remove a tag (that the user previously added) from a comment.""" |
|
|
comment = request.context |
|
|
comment = request.context |
|
|
|
|
|
|
|
|
@ -287,7 +287,7 @@ def untag_comment(request: Request, name: CommentTagOption) -> Response: |
|
|
request_method='PUT', |
|
|
request_method='PUT', |
|
|
permission='mark_read', |
|
|
permission='mark_read', |
|
|
) |
|
|
) |
|
|
def mark_read_comment(request: Request) -> Response: |
|
|
|
|
|
|
|
|
def put_mark_read_comment(request: Request) -> Response: |
|
|
"""Mark a comment read (clear all notifications).""" |
|
|
"""Mark a comment read (clear all notifications).""" |
|
|
comment = request.context |
|
|
comment = request.context |
|
|
|
|
|
|
|
|
|