From f451ff0287781c4a6d3d58685c99d4b415a0e518 Mon Sep 17 00:00:00 2001 From: philipptrenz Date: Thu, 8 Nov 2018 16:47:52 +0100 Subject: [PATCH] Fixed mixed intends --- sunportal.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sunportal.py b/sunportal.py index ef131bb..7ab1e20 100755 --- a/sunportal.py +++ b/sunportal.py @@ -16,25 +16,25 @@ @app.route('/') def home(): - return render_template('index.html') + return render_template('index.html') @app.route('/update', methods=['POST']) def update(): - if request.headers['Content-Type'] == 'application/json': - content = request.json - if 'date' not in content: flask.abort(400) - date = content['date'] - return jsonify(db.get(date)) + if request.headers['Content-Type'] == 'application/json': + content = request.json + if 'date' not in content: flask.abort(400) + date = content['date'] + return jsonify(db.get(date)) - else: - flask.abort(400) + else: + flask.abort(400) ############################################### if __name__ == '__main__': - try: - if mail.is_enabled: mail.start() - app.run(host='0.0.0.0', port=80) - except: - db.close() - mail.join() + try: + if mail.is_enabled: mail.start() + app.run(host='0.0.0.0', port=80) + except: + db.close() + mail.join()