aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-04-01 01:54:10 +0100
committerGravatar Joe Banks <[email protected]>2024-04-01 13:56:22 +0100
commit5d01a07a4287ee0fd1fd441d72da665a7704a382 (patch)
treebd880f5b6f04ebdfe1e2d243feb6d45c8827dbbd /pydis_site
parentUpdate Python version requirements in contributing guide (#1283) (diff)
Don't propagate the status received from Discord to GitHub Webhook
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/views.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pydis_site/apps/api/views.py b/pydis_site/apps/api/views.py
index 1fa3efc2..ab7a5cf3 100644
--- a/pydis_site/apps/api/views.py
+++ b/pydis_site/apps/api/views.py
@@ -305,7 +305,14 @@ class GitHubWebhookFilterView(APIView):
)
headers.pop('Connection', None)
headers.pop('Content-Length', None)
- return Response(data=body, headers=headers, status=response_status)
+
+ response_body = {
+ "original_status": response_status,
+ "data": body.decode("utf-8"),
+ "headers": headers,
+ }
+
+ return Response(response_body)
def send_webhook(
self,