Browse Source

Fix json response

Colin Powell 3 years ago
parent
commit
d1c2cfe7d0
1 changed files with 4 additions and 2 deletions
  1. 4 2
      games/views.py

+ 4 - 2
games/views.py

@@ -171,9 +171,11 @@ def trigger_rom_update(request):
     except FileNotFoundError:
     except FileNotFoundError:
         return HttpResponse(
         return HttpResponse(
             json.dumps({"success": False, "msg": "Skyscraper is not installed"}),
             json.dumps({"success": False, "msg": "Skyscraper is not installed"}),
-            mimetype="application/json",
+            status=400,
+            content_type="application/json",
         )
         )
     return HttpResponse(
     return HttpResponse(
         json.dumps({"success": True, "msg": "Library scan started"}),
         json.dumps({"success": True, "msg": "Library scan started"}),
-        mimetype="application/json",
+        status=200,
+        content_type="application/json",
     )
     )