From 046fd062dcddc0dfb8980338c2c8c75941514af8 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 8 Dec 2024 22:35:28 -0500 Subject: [PATCH] current_user --- services/web/project/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/web/project/__init__.py b/services/web/project/__init__.py index 88bbf93..d734331 100644 --- a/services/web/project/__init__.py +++ b/services/web/project/__init__.py @@ -40,7 +40,6 @@ def token_required(f): if not token: return jsonify({'message': 'Error - missing token'}), 403 try: - #data = jwt.decode(token, app.config['SECRET_KEY'], algorithm="HS256") data= jwt.decode(token, app.config['SECRET_KEY'], algorithms=["HS256"]) except: return jsonify({'message': 'Token is invalid'}),403 @@ -150,8 +149,8 @@ def start_resetpass(): @app.route("/panel/account") @token_required -def account(): - return jsonify(hello="ameye world") +def panel_account(current_user): + return jsonify(hello=current_user) @app.route("/panel/account/dash") @token_required