aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2019-09-14 21:03:52 +0200
committerGravatar Leon Sandøy <[email protected]>2019-09-14 21:03:52 +0200
commit7d1b1bff184d66df5a8a32a9e7deccce62c4c4ce (patch)
tree4e7006ab2fb14dc4d955ff4ea76f5590394335d5 /pydis_site
parentCheck for missing migrations in CI. (diff)
Adding the UpdateModelMixin to the ReminderViewSet.
This will allow us to edit durations using the PATCH method, which the bot implements already but which was overlooked when this viewset was written.
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/viewsets/bot/reminder.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/reminder.py b/pydis_site/apps/api/viewsets/bot/reminder.py
index d4ac8c76..2acfecca 100644
--- a/pydis_site/apps/api/viewsets/bot/reminder.py
+++ b/pydis_site/apps/api/viewsets/bot/reminder.py
@@ -3,7 +3,8 @@ from rest_framework.filters import SearchFilter
from rest_framework.mixins import (
CreateModelMixin,
DestroyModelMixin,
- ListModelMixin
+ ListModelMixin,
+ UpdateModelMixin
)
from rest_framework.viewsets import GenericViewSet
@@ -11,7 +12,7 @@ from pydis_site.apps.api.models.bot.reminder import Reminder
from pydis_site.apps.api.serializers import ReminderSerializer
-class ReminderViewSet(CreateModelMixin, ListModelMixin, DestroyModelMixin, GenericViewSet):
+class ReminderViewSet(CreateModelMixin, ListModelMixin, DestroyModelMixin, UpdateModelMixin, GenericViewSet):
"""
View providing CRUD access to reminders.