def index(): if flask.request.method == 'POST': try: form_data = flask.json.loads(next(flask.request.form.keys())) except StopIteration: return flask.jsonify(submit=False) if issue.create_issue(form_data['title'], form_data['message']): return flask.jsonify(submit=True) return flask.jsonify(submit=False) return app.send_static_file("index.html")
def login(): if flask.request.method == 'POST': try: form_data = flask.json.loads(next(flask.request.form.keys())) except StopIteration: return flask.jsonify(login=False) if login_service.login_account(form_data['username'], form_data['password']): return flask.jsonify(login=True) return flask.jsonify(login=False) return app.send_static_file("login.html")
def task(): return app.send_static_file("task.html")
def vote(): return app.send_static_file("vote.html")
def favicon(): return app.send_static_file('favicon.ico')
def record(): return app.send_static_file("records.html")