Added survey to web application with the backend working

This commit is contained in:
cami 2021-06-27 00:39:28 +02:00
parent 8424cb346f
commit e0ffe1a79b
2 changed files with 39 additions and 13 deletions

View file

@ -148,7 +148,18 @@ def register():
new_user.username
)}
return ret, 200
@app.route('/umfrage', methods=['POST'])
@flask_praetorian.auth_required
def survey():
req = flask.request.get_json(force=True)
gender = req.get('gender', None)
print(req)
ret = {'message': 'Umfrage freigestellt'}
return ret, 200
@app.route('/time')
def get_current_time():
return {'time': time.time()}