feat: implement backend core with repricing logic, case management, and multi-service architecture

This commit is contained in:
2026-05-13 00:28:13 +03:00
parent 38f3199c33
commit d9aae5b85e
15 changed files with 596 additions and 90 deletions

View File

@@ -24,9 +24,13 @@ def token_required(f):
try:
data = jwt.decode(token, SECRET_KEY, algorithms=["HS256"])
current_user_id = data['user_id']
user_info = {
'user_id': data['user_id'],
'company_id': data['company_id'],
'role': data['role']
}
except Exception as e:
return jsonify({'message': 'Token is invalid or expired!'}), 401
return f(current_user_id, *args, **kwargs)
return f(user_info, *args, **kwargs)
return decorated