diff --git a/backend/src/app.py b/backend/src/app.py index 84a77d1..3a6e68a 100644 --- a/backend/src/app.py +++ b/backend/src/app.py @@ -157,6 +157,17 @@ def register(): return ret, 409 +@app.route('/api/protected/behavior', methods=['POST']) +@flask_praetorian.auth_required +def check_password_username(): + req = flask.request.get_json(force=True) + token = guard.read_token_from_header() + extracted_token = guard.extract_jwt_token(token) + id_req = extracted_token['id'] + ret = {'message': 'Top'} + return ret, 200 + + @app.route('/api/protected/umfrage', methods=['POST']) @flask_praetorian.auth_required def survey(): @@ -228,12 +239,6 @@ def survey(): return ret, 400 -@app.route('/api/protected/behavior', methods=['POST']) -@flask_praetorian.auth_required -def check_password_username(): - print("hallooo POST", file=sys.stderr) - ret = {'message': 'Top'} - return ret, 200 # Run the example diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico index a11777c..a8b9c3b 100644 Binary files a/frontend/public/favicon.ico and b/frontend/public/favicon.ico differ diff --git a/frontend/public/index.html b/frontend/public/index.html index e2973eb..fa21ab4 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -28,10 +28,10 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + BA - Marco Camenzind - +