From 1d67beb7938635044aff75c819a7c78dde81ac63 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Wed, 9 Jan 2019 20:52:06 +0100 Subject: Add a view returning the server rules. Closes #171. --- api/urls.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'api/urls.py') diff --git a/api/urls.py b/api/urls.py index 7d6a4f7d..66d3fb9e 100644 --- a/api/urls.py +++ b/api/urls.py @@ -1,7 +1,7 @@ from django.urls import include, path from rest_framework.routers import DefaultRouter -from .views import HealthcheckView +from .views import HealthcheckView, RulesView from .viewsets import ( DocumentationLinkViewSet, InfractionViewSet, OffTopicChannelNameViewSet, RoleViewSet, @@ -63,5 +63,6 @@ urlpatterns = ( # from django_hosts.resolvers import reverse # snake_name_endpoint = reverse('bot:snakename-list', host='api') # `bot/` endpoints path('bot/', include((bot_router.urls, 'api'), namespace='bot')), - path('healthcheck', HealthcheckView.as_view(), name='healthcheck') + path('healthcheck', HealthcheckView.as_view(), name='healthcheck'), + path('rules', RulesView.as_view(), name='rules') ) -- cgit v1.2.3