aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-02-18 20:52:50 +0100
committerGravatar Johannes Christ <[email protected]>2019-02-18 20:52:50 +0100
commit89f633c17fe0f8afcb12bc1e63b5bf3cd71d709b (patch)
treedcc64896706e2c769f4539bd1a7bf04717c58069
parentAdd a new endpoint for updating bot settings. (diff)
Allow retrieval of individual bot settings.
-rw-r--r--api/admin.py14
-rw-r--r--api/viewsets.py2
2 files changed, 9 insertions, 7 deletions
diff --git a/api/admin.py b/api/admin.py
index ab7e814e..3ae7f3c5 100644
--- a/api/admin.py
+++ b/api/admin.py
@@ -1,15 +1,17 @@
from django.contrib import admin
from .models import (
- DeletedMessage, DocumentationLink,
- Infraction, MessageDeletionContext,
- OffTopicChannelName, Role,
- SnakeFact, SnakeIdiom,
- SnakeName, SpecialSnake,
- Tag, User
+ BotSetting, DeletedMessage,
+ DocumentationLink, Infraction,
+ MessageDeletionContext, OffTopicChannelName,
+ Role, SnakeFact,
+ SnakeIdiom, SnakeName,
+ SpecialSnake, Tag,
+ User
)
+admin.site.register(BotSetting)
admin.site.register(DeletedMessage)
admin.site.register(DocumentationLink)
admin.site.register(Infraction)
diff --git a/api/viewsets.py b/api/viewsets.py
index 61e93058..17024fe8 100644
--- a/api/viewsets.py
+++ b/api/viewsets.py
@@ -34,7 +34,7 @@ from .serializers import (
)
-class BotSettingViewSet(UpdateModelMixin, GenericViewSet):
+class BotSettingViewSet(RetrieveModelMixin, UpdateModelMixin, GenericViewSet):
"""
View providing update operations on bot setting routes.
"""