diff options
author | Veronika Kabatova <vkabatov@redhat.com> | 2018-04-25 19:33:27 +0200 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2018-04-27 17:32:16 +0100 |
commit | 43cc7fef3899b88358d87ae090f77c3c923f6b7f (patch) | |
tree | b01a79ad0961a352c1c4c5dc9f80cfee15258fe7 /patchwork/urls.py | |
parent | c8797a670b1bc6e5543998f2493156068d32026a (diff) | |
download | patchwork-43cc7fef3899b88358d87ae090f77c3c923f6b7f.tar patchwork-43cc7fef3899b88358d87ae090f77c3c923f6b7f.tar.gz |
REST: Add comments to patch and cover endpoints
Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'patchwork/urls.py')
-rw-r--r-- | patchwork/urls.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/patchwork/urls.py b/patchwork/urls.py index 0893fe2..1dc4ffc 100644 --- a/patchwork/urls.py +++ b/patchwork/urls.py @@ -213,6 +213,7 @@ if settings.ENABLE_REST_API: from patchwork.api import bundle as api_bundle_views # noqa from patchwork.api import check as api_check_views # noqa + from patchwork.api import comment as api_comment_views # noqa from patchwork.api import cover as api_cover_views # noqa from patchwork.api import event as api_event_views # noqa from patchwork.api import index as api_index_views # noqa @@ -279,8 +280,18 @@ if settings.ENABLE_REST_API: name='api-event-list'), ] + api_1_1_patterns = [ + url(r'^patches/(?P<pk>[^/]+)/comments/$', + api_comment_views.CommentList.as_view(), + name='api-comment-list'), + url(r'^covers/(?P<pk>[^/]+)/comments/$', + api_comment_views.CommentList.as_view(), + name='api-comment-list'), + ] + urlpatterns += [ url(r'^api/(?:(?P<version>(1.0|1.1))/)?', include(api_patterns)), + url(r'^api/(?:(?P<version>1.1)/)?', include(api_1_1_patterns)), # token change url(r'^user/generate-token/$', user_views.generate_token, |