Loading kronk.py +5 −3 Original line number Diff line number Diff line Loading @@ -208,10 +208,10 @@ class Kronk: return Response(json.dumps(apistatus), mimetype="application/json") # flask route for remotely setting display state for if someone like, forgets to click out or whatever def remote_close(self): def remote_close(self, new_state: str): valid_states = ["INVISIBLE", "OPEN", "CLOSED"] if self.state in valid_states: if new_state in valid_states: self.space_status = self.state self.last_space_status_change = time.time() self.clock_force_draw = 1 Loading @@ -224,7 +224,9 @@ class Kronk: # setup the routes flask_app.add_url_rule("/status", self.get_status, methods=["GET"]) flask_app.add_url_rule("/remote/<state>", self.remote_close, methods=["POST"]) flask_app.add_url_rule( "/remote/<new_state>", self.remote_close, methods=["POST"] ) def run_flask(): flask_app.run(host=host, port=port, debug=False, use_reloader=False) Loading Loading
kronk.py +5 −3 Original line number Diff line number Diff line Loading @@ -208,10 +208,10 @@ class Kronk: return Response(json.dumps(apistatus), mimetype="application/json") # flask route for remotely setting display state for if someone like, forgets to click out or whatever def remote_close(self): def remote_close(self, new_state: str): valid_states = ["INVISIBLE", "OPEN", "CLOSED"] if self.state in valid_states: if new_state in valid_states: self.space_status = self.state self.last_space_status_change = time.time() self.clock_force_draw = 1 Loading @@ -224,7 +224,9 @@ class Kronk: # setup the routes flask_app.add_url_rule("/status", self.get_status, methods=["GET"]) flask_app.add_url_rule("/remote/<state>", self.remote_close, methods=["POST"]) flask_app.add_url_rule( "/remote/<new_state>", self.remote_close, methods=["POST"] ) def run_flask(): flask_app.run(host=host, port=port, debug=False, use_reloader=False) Loading