Claude detection respects payment filter, add project skill
- Backend check-claude-payment accepts optional emails list - Frontend sends filtered emails when filter is active - Button label updates to show current filter scope - Add project skill for development guidance Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
16
mail_api.py
16
mail_api.py
@@ -1222,10 +1222,20 @@ async def _check_claude_payment_for_account(email_addr: str) -> dict:
|
||||
}
|
||||
|
||||
@app.post("/api/tools/check-claude-payment")
|
||||
async def check_claude_payment():
|
||||
"""SSE流式扫描所有账户的Claude支付状态"""
|
||||
async def check_claude_payment(request: Request):
|
||||
"""SSE流式扫描账户的Claude支付状态,支持传入指定邮箱列表"""
|
||||
try:
|
||||
body = await request.json()
|
||||
target_emails = body.get('emails', []) if body else []
|
||||
except Exception:
|
||||
target_emails = []
|
||||
|
||||
accounts = await load_accounts_config()
|
||||
emails = list(accounts.keys())
|
||||
if target_emails:
|
||||
# 只检测指定的邮箱(且必须在账户中存在)
|
||||
emails = [e for e in target_emails if e in accounts]
|
||||
else:
|
||||
emails = list(accounts.keys())
|
||||
|
||||
async def event_generator():
|
||||
total = len(emails)
|
||||
|
||||
Reference in New Issue
Block a user