fix: 搜索路由参数校验 — page>=1、limit 1-500

This commit is contained in:
2026-05-20 02:46:13 +08:00
parent d7b055f88b
commit c4ca8edd58
53 changed files with 855 additions and 21 deletions

View File

@@ -141,9 +141,13 @@ export function saveCloudConfig(data: {
WHERE id = ?`
).run(data.cloud_type, encryptedCookie, data.nickname || null, cookieUidForUpdate || null, cookieUidForUpdate || null, data.promotion_account || null, data.is_active ?? 1, data.storage_used || null, data.storage_total || null, localTimestamp(), data.id);
} else {
const existing = db.prepare(
'SELECT id, nickname FROM cloud_configs WHERE cloud_type = ? AND is_active = 1 LIMIT 1'
).get(data.cloud_type) as any;
const existing = data.promotion_account
? db.prepare(
'SELECT id, nickname FROM cloud_configs WHERE cloud_type = ? AND is_active = 1 AND promotion_account = ? LIMIT 1'
).get(data.cloud_type, data.promotion_account) as any
: db.prepare(
'SELECT id, nickname FROM cloud_configs WHERE cloud_type = ? AND is_active = 1 LIMIT 1'
).get(data.cloud_type) as any;
if (existing) {
db.prepare(
`UPDATE cloud_configs SET