mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 19:52:57 +00:00
Fix webhook logs endpoint CSRF and error handling
- Add @csrf_exempt decorator to get_webhook_logs view - Add try-catch error handling for webhook logs retrieval - This should resolve the 'Unexpected token' JSON parsing errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b865fd4781
commit
16d07168d0
@ -260,9 +260,14 @@ def simple_webhook_test(request):
|
|||||||
return HttpResponse("WEBHOOK RECEIVED OK", content_type="text/plain")
|
return HttpResponse("WEBHOOK RECEIVED OK", content_type="text/plain")
|
||||||
|
|
||||||
|
|
||||||
|
@csrf_exempt
|
||||||
def get_webhook_logs(request):
|
def get_webhook_logs(request):
|
||||||
"""Get webhook logs for the test page"""
|
"""Get webhook logs for the test page"""
|
||||||
|
try:
|
||||||
return JsonResponse({'logs': webhook_logs})
|
return JsonResponse({'logs': webhook_logs})
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error in get_webhook_logs: {e}")
|
||||||
|
return JsonResponse({'logs': [], 'error': str(e)})
|
||||||
|
|
||||||
|
|
||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user