Commit 2bd1121e by Félicie

error messages specified

parent 15bd022d
......@@ -223,9 +223,11 @@ def change_shift(request):
response = {'result': True}
else:
response = {'result': False}
response = {'msg': "Fail to create shift"}
return JsonResponse(response, status=500)
else:
response = {'result': False}
response = {'msg': "Bad arguments"}
return JsonResponse(response, status=400)
return JsonResponse(response)
else:
return HttpResponseForbidden()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment