diff --git a/modules/rest_api.py b/modules/rest_api.py index e081cf7c..897d306b 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -20,10 +20,9 @@ class Response(object): self._data += data.encode("utf8") def write_json(self, obj): if self._compact: - data = json.dumps(event_response, sort_keys=True, - separators=(",", ":")) + data = json.dumps(obj, sort_keys=True, separators=(",", ":")) else: - data = json.dumps(event_response, sort_keys=True, indent=4) + data = json.dumps(obj, sort_keys=True, indent=4) self._data += data.encode("utf8") def set_header(self, key: str, value: str):