mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
This commit is contained in:
committed by
Dave Page
parent
155f82676d
commit
df85392bbf
@@ -45,7 +45,8 @@ def get_no_cache_header():
|
||||
|
||||
|
||||
def make_json_response(
|
||||
success=1, errormsg='', info='', result=None, data=None, status=200
|
||||
success=1, errormsg='', info='', result=None, data=None, status=200,
|
||||
encoding='utf-8'
|
||||
):
|
||||
"""Create a HTML response document describing the results of a request and
|
||||
containing the data."""
|
||||
@@ -58,7 +59,7 @@ def make_json_response(
|
||||
|
||||
return Response(
|
||||
response=json.dumps(doc, cls=DataTypeJSONEncoder,
|
||||
separators=(',', ':')),
|
||||
separators=(',', ':'), encoding=encoding),
|
||||
status=status,
|
||||
mimetype="application/json",
|
||||
headers=get_no_cache_header()
|
||||
|
||||
Reference in New Issue
Block a user