This commit is contained in:
2026-05-16 02:22:14 +03:00
parent 88e4ab62be
commit 22576c0c40

View File

@@ -24,11 +24,7 @@ def token_required(f):
try:
data = jwt.decode(token, SECRET_KEY, algorithms=["HS256"])
user_info = {
'user_id': data['user_id'],
'company_id': data['company_id'],
'role': data['role']
}
user_info = data['user_id'] # передаём просто user_id (int)
except Exception as e:
return jsonify({'message': 'Token is invalid or expired!'}), 401