feat: IP-based daily account priority for save
- Added ip_daily_save_counts table to track per-IP daily usage - getAndValidateCredential now accepts ipAddress parameter - First 2 saves by same IP use primary account; 3rd+ round-robins to other accounts - Counter increments on each successful credential acquisition - All timestamps in Asia/Shanghai timezone
This commit is contained in:
@@ -141,7 +141,7 @@ async function doSaveFromShare(shareUrl: string, cloudType: string, sourceTitle?
|
||||
}
|
||||
|
||||
// ── Unified credential validation ──
|
||||
const credential = await getAndValidateCredential(cloudType);
|
||||
const credential = await getAndValidateCredential(cloudType, ipAddress);
|
||||
if (!credential.valid || !credential.config) {
|
||||
return { success: false, message: credential.message };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user