JSON format fix

This commit is contained in:
2021-09-15 09:16:43 +02:00
parent 8345491a65
commit faa657cc04
+10 -10
View File
@@ -134,16 +134,16 @@ class GarageService(object):
return "Hello World!" return "Hello World!"
# deprecated # deprecated
@cherrypy.expose # @cherrypy.expose
def motor(self): # def motor(self):
Thread(target=garage_button,args=[0]).start() # Thread(target=garage_button,args=[0]).start()
return "trigger garage door" # return "trigger garage door"
# deprecated # deprecated
@cherrypy.expose # @cherrypy.expose
def remote(self): # def remote(self):
Thread(target=gate_button,args=[0]).start() # Thread(target=gate_button,args=[0]).start()
return "trigger gate" # return "trigger gate"
@cherrypy.expose @cherrypy.expose
def garage(self, action=None): def garage(self, action=None):
@@ -157,7 +157,7 @@ class GarageService(object):
status = "true" status = "true"
else: else:
status = "false" status = "false"
return '{ "status": "' + status + '" }' return '{ "status": ' + status + ' }'
@cherrypy.expose @cherrypy.expose
def gate(self, action=None): def gate(self, action=None):
@@ -171,7 +171,7 @@ class GarageService(object):
status = "false" status = "false"
else: else:
status = "true" status = "true"
return '{ "status": "' + status + '" }' return '{ "status": ' + status + ' }'
@cherrypy.expose @cherrypy.expose
def all(self): def all(self):