From a908b9aa3a18222f296c0e4bd67d815f48ada5af Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Wed, 13 Dec 2023 09:07:08 +0100 Subject: Migrate mailing lists to their own API endpoints Add a new model for the bot to store its mailing list state in, as opposed to the current JSON blob in the BotSetting table. Migrate the existing settings from the BotSetting table into the new model. --- pydis_site/apps/api/urls.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pydis_site/apps/api/urls.py') diff --git a/pydis_site/apps/api/urls.py b/pydis_site/apps/api/urls.py index 80d4edc2..5cda033a 100644 --- a/pydis_site/apps/api/urls.py +++ b/pydis_site/apps/api/urls.py @@ -17,6 +17,7 @@ from .viewsets import ( FilterListViewSet, FilterViewSet, InfractionViewSet, + MailingListViewSet, NominationViewSet, OffTopicChannelNameViewSet, OffensiveMessageViewSet, @@ -67,6 +68,10 @@ bot_router.register( 'infractions', InfractionViewSet ) +bot_router.register( + 'mailing-lists', + MailingListViewSet +) bot_router.register( 'nominations', NominationViewSet -- cgit v1.2.3