Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Fixed mixed intends
Browse files Browse the repository at this point in the history
  • Loading branch information
philipptrenz committed Nov 8, 2018
1 parent 8c86d05 commit f451ff0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sunportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit f451ff0

Please sign in to comment.