From ee15d3f2b2e2466a1cc088db1a80ada3940987d0 Mon Sep 17 00:00:00 2001 From: iFargle Date: Wed, 15 Feb 2023 20:17:18 +0900 Subject: [PATCH] Updater --- server.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server.py b/server.py index 135ed66..a6d89bb 100644 --- a/server.py +++ b/server.py @@ -37,10 +37,10 @@ app.logger.warning("BASE_PATH: "+BASE_PATH) @app.route('/overview') @app.route(BASE_PATH+'/overview') def overview_page(): - # If the API key fails, redirect to the settings page: - if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page')) # General error checks. See the function for more info: if helper.startup_checks() != "Pass": return redirect(BASE_PATH+url_for('error_page')) + # If the API key fails, redirect to the settings page: + if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page')) return render_template('overview.html', render_page = renderer.render_overview(), @@ -51,10 +51,10 @@ def overview_page(): @app.route(BASE_PATH+'/machines', methods=('GET', 'POST')) @app.route('/machines', methods=('GET', 'POST')) def machines_page(): - # If the API key fails, redirect to the settings page: - if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page')) # General error checks. See the function for more info: if helper.startup_checks() != "Pass": return redirect(BASE_PATH+url_for('error_page')) + # If the API key fails, redirect to the settings page: + if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page')) cards = renderer.render_machines_cards() return render_template('machines.html', @@ -67,10 +67,10 @@ def machines_page(): @app.route(BASE_PATH+'/users', methods=('GET', 'POST')) @app.route('/users', methods=('GET', 'POST')) def users_page(): - # If the API key fails, redirect to the settings page: - if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page')) # General error checks. See the function for more info: if helper.startup_checks() != "Pass": return redirect(BASE_PATH+url_for('error_page')) + # If the API key fails, redirect to the settings page: + if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page')) cards = renderer.render_users_cards() return render_template('users.html',