fix(api): fix API Key rate limiting and terminal user quota checks
- Revert API Key rate limit handling to throw an error instead of auto-capping when exceeding the plan limit. - Optimize terminal user quota check logic to validate only during new user creation, avoiding redundant checks. - Add method to query terminal users by `workspace_id` and `other_id`.
This commit is contained in:
@@ -167,6 +167,8 @@ def update_api_key(
|
||||
|
||||
return success(data=api_key_schema.ApiKey.model_validate(api_key), msg="API Key 更新成功")
|
||||
|
||||
except BusinessException:
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.error(f"未知错误: {str(e)}", extra={
|
||||
"api_key_id": str(api_key_id),
|
||||
|
||||
Reference in New Issue
Block a user