JSON format fix
This commit is contained in:
+10
-10
@@ -134,16 +134,16 @@ class GarageService(object):
|
||||
return "Hello World!"
|
||||
|
||||
# deprecated
|
||||
@cherrypy.expose
|
||||
def motor(self):
|
||||
Thread(target=garage_button,args=[0]).start()
|
||||
return "trigger garage door"
|
||||
# @cherrypy.expose
|
||||
# def motor(self):
|
||||
# Thread(target=garage_button,args=[0]).start()
|
||||
# return "trigger garage door"
|
||||
|
||||
# deprecated
|
||||
@cherrypy.expose
|
||||
def remote(self):
|
||||
Thread(target=gate_button,args=[0]).start()
|
||||
return "trigger gate"
|
||||
# @cherrypy.expose
|
||||
# def remote(self):
|
||||
# Thread(target=gate_button,args=[0]).start()
|
||||
# return "trigger gate"
|
||||
|
||||
@cherrypy.expose
|
||||
def garage(self, action=None):
|
||||
@@ -157,7 +157,7 @@ class GarageService(object):
|
||||
status = "true"
|
||||
else:
|
||||
status = "false"
|
||||
return '{ "status": "' + status + '" }'
|
||||
return '{ "status": ' + status + ' }'
|
||||
|
||||
@cherrypy.expose
|
||||
def gate(self, action=None):
|
||||
@@ -171,7 +171,7 @@ class GarageService(object):
|
||||
status = "false"
|
||||
else:
|
||||
status = "true"
|
||||
return '{ "status": "' + status + '" }'
|
||||
return '{ "status": ' + status + ' }'
|
||||
|
||||
@cherrypy.expose
|
||||
def all(self):
|
||||
|
||||
Reference in New Issue
Block a user