9
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user