mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-08-01 00:24:48 +02:00
Fix wrong error response from api
This commit is contained in:
parent
383ea5fa31
commit
c39721de96
1 changed files with 2 additions and 2 deletions
|
@ -82,9 +82,9 @@ def get_ip():
|
|||
def buildResponse(data,httpcode=200 ,error=False):
|
||||
"""Builds a JSON response from data."""
|
||||
res={}
|
||||
if error:
|
||||
res["err"]=error
|
||||
res["result"]=data
|
||||
if error:
|
||||
res["result"]["err"]=error
|
||||
|
||||
return jsonify(res), httpcode
|
||||
# --------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue