diff --git a/bookwyrm/views/admin/announcements.py b/bookwyrm/views/admin/announcements.py index 0b5ce9fa44..c5a7c80ff8 100644 --- a/bookwyrm/views/admin/announcements.py +++ b/bookwyrm/views/admin/announcements.py @@ -5,6 +5,7 @@ from django.template.response import TemplateResponse from django.utils.decorators import method_decorator from django.views import View +from django.views.decorators.http import require_POST from bookwyrm import forms, models from bookwyrm.settings import PAGE_LENGTH @@ -108,6 +109,7 @@ def post(self, request, announcement_id=None): @login_required @permission_required("bookwyrm.edit_instance_settings", raise_exception=True) +@require_POST def delete_announcement(_, announcement_id): """delete announcement""" announcement = get_object_or_404(models.Announcement, id=announcement_id)