aboutsummaryrefslogtreecommitdiffstats
path: root/api/urls.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-20 09:52:57 +0100
committerGravatar Johannes Christ <[email protected]>2019-01-20 09:52:57 +0100
commitbdc337d70a386cae954399e55bb128119f601128 (patch)
treef1b90e9a2c028478e1b82325704ffdd943c4b3b6 /api/urls.py
parentMerge branch 'django' into django+add-logs-api. (diff)
parentAdd an example `docker-compose.yml`. (diff)
Merge branch 'django' into django+add-logs-api
Diffstat (limited to 'api/urls.py')
-rw-r--r--api/urls.py26
1 files changed, 18 insertions, 8 deletions
diff --git a/api/urls.py b/api/urls.py
index dca208d8..75980d75 100644
--- a/api/urls.py
+++ b/api/urls.py
@@ -1,13 +1,14 @@
from django.urls import include, path
from rest_framework.routers import DefaultRouter
-from .views import HealthcheckView
+from .views import HealthcheckView, RulesView
from .viewsets import (
DeletedMessageViewSet, DocumentationLinkViewSet,
- OffTopicChannelNameViewSet, RoleViewSet,
- SnakeFactViewSet, SnakeIdiomViewSet,
- SnakeNameViewSet, SpecialSnakeViewSet,
- TagViewSet, UserViewSet
+ InfractionViewSet, OffTopicChannelNameViewSet,
+ RoleViewSet, SnakeFactViewSet,
+ SnakeIdiomViewSet, SnakeNameViewSet,
+ SpecialSnakeViewSet, TagViewSet,
+ UserViewSet
)
@@ -22,13 +23,17 @@ bot_router.register(
DocumentationLinkViewSet
)
bot_router.register(
+ 'infractions',
+ InfractionViewSet
+)
+bot_router.register(
'off-topic-channel-names',
OffTopicChannelNameViewSet,
base_name='offtopicchannelname'
)
bot_router.register(
- 'users',
- UserViewSet
+ 'roles',
+ RoleViewSet
)
bot_router.register(
'roles',
@@ -55,6 +60,10 @@ bot_router.register(
'tags',
TagViewSet
)
+bot_router.register(
+ 'users',
+ UserViewSet
+)
app_name = 'api'
urlpatterns = (
@@ -63,5 +72,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')
)