From 5a7bd05b37d76d6573ffe112cda9eccd87ae4243 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Mon, 24 Jan 2022 08:14:41 +0900 Subject: [PATCH] Change the path of CommentDetail API --- backend/api/tests/api/test_comment.py | 2 +- backend/api/urls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api/tests/api/test_comment.py b/backend/api/tests/api/test_comment.py index d24f6902..a3622287 100644 --- a/backend/api/tests/api/test_comment.py +++ b/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. diff --git a/backend/api/urls.py b/backend/api/urls.py index ba3ed0c5..be55ea77 100644 --- a/backend/api/urls.py +++ b/backend/api/urls.py @@ -126,7 +126,7 @@ urlpatterns_project = [ name='comment_list_project' ), path( - route='examples//comments/', + route='comments/', view=comment.CommentDetail.as_view(), name='comment_detail' ),