feat(automation): 增加登录预算动态建议
This commit is contained in:
@@ -32,6 +32,7 @@ from ..services.automation import (
|
||||
run_job_now,
|
||||
scheduler_status,
|
||||
)
|
||||
from ..services.login_budget_recommendation import recommend_login_budget
|
||||
|
||||
router = APIRouter(prefix="/api/automation", tags=["自动化"])
|
||||
|
||||
@@ -179,6 +180,15 @@ def get_login_quota(
|
||||
return _login_quota_out(row)
|
||||
|
||||
|
||||
@router.get("/login-quota/recommendation")
|
||||
def get_login_quota_recommendation(
|
||||
db: Session = Depends(get_db),
|
||||
current: User = Depends(require_permission("automation:view")),
|
||||
):
|
||||
"""Advisory budget sizing; applying it remains an explicit operator action."""
|
||||
return recommend_login_budget(db)
|
||||
|
||||
|
||||
@router.put("/login-quota")
|
||||
def update_login_quota(
|
||||
payload: LoginQuotaUpdate,
|
||||
|
||||
Reference in New Issue
Block a user