mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
Added placeholder webite for main website
This commit is contained in:
@@ -15,11 +15,15 @@ mqtt_client.loop_start()
|
||||
mqtt_client.subscribe("kobuki/data")
|
||||
mqtt_client.on_message = on_message # this lines needs to be under the function definition otherwise it cant find which function it needs to use
|
||||
|
||||
|
||||
@app.route('/', methods=["GET","POST"])
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render_template('index.html')
|
||||
|
||||
|
||||
@app.route('/control', methods=["GET","POST"])
|
||||
def control():
|
||||
if request.authorization and request.authorization.username == 'ishak' and request.authorization.password == 'kobuki':
|
||||
return render_template('index.html')
|
||||
return render_template('control.html')
|
||||
else:
|
||||
return ('Unauthorized', 401, {'WWW-Authenticate': 'Basic realm="Login Required"'})
|
||||
|
||||
|
Reference in New Issue
Block a user