From 3078189212da2e5c4c9826753c6de32f24ed464e Mon Sep 17 00:00:00 2001 From: krmax44 Date: Mon, 16 Dec 2024 16:39:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=82=20don't=20allow=20publish=20via=20?= =?UTF-8?q?get,=20as=20it's=20considered=20a=20safe=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- froide/foirequest/api_views/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/froide/foirequest/api_views/message.py b/froide/foirequest/api_views/message.py index 6dac61a9e..45abd297c 100644 --- a/froide/foirequest/api_views/message.py +++ b/froide/foirequest/api_views/message.py @@ -69,7 +69,7 @@ def get_queryset(self): ).order_by() return self.optimize_query(qs) - @action(detail=True, methods=["get", "post"]) + @action(detail=True, methods=["post"]) def publish(self, request, pk=None): message = self.get_object() message.is_draft = False