Skip to content

Commit

Permalink
adding messages to return json #633
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Letter committed Aug 26, 2016
1 parent 65f27bc commit 042b9b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/slycat/web/server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ def post_remotes():
Given username, hostname, password as a json payload
establishes a session with the remote host and attaches
it to the users session
:return: {"success":boolean, msg:""}
:return: {"sid":sid, "status":boolean, msg:""}
"""
username = cherrypy.request.json["username"]
hostname = cherrypy.request.json["hostname"]
Expand All @@ -1752,7 +1752,7 @@ def post_remotes():
database.save(session)
except Exception as e:
cherrypy.log.error("could not save session for remotes %s" % e)
return {"sid": sid}
return {"sid":sid, "status":True, "msg":""}

@cherrypy.tools.json_out(on = True)
def get_remotes(hostname):
Expand Down

0 comments on commit 042b9b9

Please sign in to comment.