Browse Source

Change the path of CommentDetail API

pull/1649/head
Hironsan 2 years ago
parent
commit
5a7bd05b37
2 changed files with 2 additions and 2 deletions
  1. 2
      backend/api/tests/api/test_comment.py
  2. 2
      backend/api/urls.py

2
backend/api/tests/api/test_comment.py

@ -87,7 +87,7 @@ class TestCommentDetailAPI(CRUDMixin):
doc = make_doc(self.project.item)
comment = make_comment(doc, self.project.users[0])
self.data = {'text': 'example'}
self.url = reverse(viewname='comment_detail', args=[self.project.item.id, doc.id, comment.id])
self.url = reverse(viewname='comment_detail', args=[self.project.item.id, comment.id])
def test_allows_comment_owner_to_get_comment(self):
# Todo: Allows project member to get comment.

2
backend/api/urls.py

@ -126,7 +126,7 @@ urlpatterns_project = [
name='comment_list_project'
),
path(
route='examples/<int:example_id>/comments/<int:comment_id>',
route='comments/<int:comment_id>',
view=comment.CommentDetail.as_view(),
name='comment_detail'
),

Loading…
Cancel
Save