Skip to content

Commit

Permalink
πŸ›‚ don't allow publish via get, as it's considered a safe method
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 committed Dec 16, 2024
1 parent b8cf3c9 commit befa14d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion froide/foirequest/api_views/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit befa14d

Please sign in to comment.