From d5e534319359284ac3005a00fdaa238d7765867b Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 25 Oct 2020 11:16:23 -0500 Subject: [PATCH] have pi simulate via API return a 201 --- pi/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pi/views.py b/pi/views.py index 29d932b..ea63733 100644 --- a/pi/views.py +++ b/pi/views.py @@ -19,4 +19,4 @@ class PiLogViewSet(ReadOnlyModelViewSet): def simulate(self, request): """Run one simulation of the pi estimator.""" simulation, _, _ = PiLog.objects.simulate() - return Response(self.get_serializer(simulation).data) + return Response(self.get_serializer(simulation).data, 201)