format results as HTTP result

This commit is contained in:
Matthias 2021-10-20 22:07:29 +02:00
parent a03c560914
commit c6a5a44355
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -7,7 +7,7 @@ from __future__ import unicode_literals
import json
from django.http.response import JsonResponse
from django.http.response import HttpResponse
from django.utils.decorators import method_decorator
from django.urls import path
from django.views.decorators.csrf import csrf_exempt
@ -64,7 +64,7 @@ class WebhookView(CsrfExemptMixin, APIView):
# return results
data = self.webhook.get_result(payload, headers, request)
return JsonResponse(data)
return HttpResponse(data)
def _process_payload(self, message_id):
message = WebhookMessage.objects.get(message_id=message_id)