development dirty hacks

This commit is contained in:
ThePetrovich 2025-06-26 18:17:14 +08:00
parent 817dddc073
commit 741aefca31
2 changed files with 6 additions and 6 deletions

View file

@ -57,7 +57,7 @@ class PredictionCreateView(APIView):
print("Tawhiri error:", str(e), e.response.text if e.response else "no response")
return Response({"error": f"Tawhiri error: {str(e)}"}, status=status.HTTP_502_BAD_GATEWAY)
prediction = Prediction.objects.create(result=prediction_result, user=request.user, request=validated_data)
prediction = Prediction.objects.create(result=prediction_result, user=request.user, request=request.data)
return Response({
"id": prediction.id,
"created_at": prediction.created_at,

View file

@ -172,8 +172,8 @@ REST_FRAMEWORK = {
}
CSRF_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_HTTPONLY = True
SESSION_COOKIE_HTTPONLY = True
CSRF_TRUSTED_ORIGINS = ['http://localhost:5173']
CSRF_COOKIE_SAMESITE = 'None' # temp
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SAMESITE = 'None' # temp
SESSION_COOKIE_SECURE = False
CSRF_TRUSTED_ORIGINS = ['http://localhost:5173', 'http://127.0.0.1:5173']