better path

This commit is contained in:
Matthew Frost 2023-11-19 01:38:44 +01:00
parent 37ebab0e89
commit bfda5805ac

View file

@ -25,7 +25,7 @@ def home():
return "hello world"
@routes.route('/powerbar_control/<string:powerbar>/<int:outlet>/<string:action>')
@routes.route('/<string:powerbar>/<int:outlet>/<string:action>')
def powerbar_control(powerbar, outlet, action):
print(f"powerbar: {powerbar}")
@ -59,7 +59,7 @@ def powerbar_control(powerbar, outlet, action):
return "200"
@routes.route('/powerbar_state/<string:powerbar>/<int:outlet>')
@routes.route('/<string:powerbar>/<int:outlet>/state')
def powerbar_state(powerbar, outlet):
print(f"powerbar: {powerbar}")
print(f"outlet: {outlet}")