We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abfe86d commit 125d898Copy full SHA for 125d898
backend/user.py
@@ -7,6 +7,7 @@
7
from app import swagger
8
from flasgger.utils import swag_from
9
from auth import forgot_password
10
+from flask_jwt_extended import jwt_required, get_jwt_identity
11
12
load_dotenv()
13
@@ -194,8 +195,10 @@ def account():
194
195
196
@app.route("/users/admin", methods=["POST"])
197
@swag_from("documentation/check_admin_user.yaml", methods=["POST"])
198
+@jwt_required()
199
def admin():
- uuid = request.form.get("uuid")
200
+ uuid = get_jwt_identity()
201
+
202
if not uuid:
203
return jsonify({"message": "Unauthorized", "code": 401}), 401
204
else:
0 commit comments