♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
GarfieldandCopilot committed 2026-11-16 14:07:45 +08:00
1 parent ff11bb481a
commit 35383a2451
11 files changed
+18 -18

No files matched your search

+5 -5
View File
@@ -64,16 +64,16 @@ Client.get("/old-response", nil, done)
pending = requests[#requests]
cfg.zysid = "renewed"
pending.cb(JSON.encode({ code = 600001 }))
Assert.is_true(not Auth.expired("ext.ireader"))
Assert.is_true(not Auth.expired("ireader"))
Assert.is_nil(result)
Client.get("/expired", nil, done)
requests[#requests].cb(JSON.encode({ code = 600001 }))
Assert.is_true(Auth.expired("ext.ireader"))
Assert.is_true(Auth.expired("ireader"))
Client.get("/stale-success", nil, done)
pending = requests[#requests]
cfg.zysid = "latest"
pending.cb(JSON.encode({ code = 0, body = {} }))
Assert.is_true(Auth.expired("ext.ireader"), "旧会话成功不能清新会话的失效标记")
Assert.is_true(Auth.expired("ireader"), "旧会话成功不能清新会话的失效标记")
mode = "sync-toc"
handle = Client.chaptersAsync("42", done)
@@ -101,12 +101,12 @@ Client.shelfAsync(done)
requests[#requests].cb(JSON.encode({ code = 0, body = {} }))
Assert.is_nil(result)
Assert.eq(reason, "响应无效")
Auth.expire("ext.ireader", "测试失效状态")
Auth.expire("ireader", "测试失效状态")
Client.checkSessionAsync({ usr = "candidate", zysid = "candidate-session" }, done)
Assert.is_true(requests[#requests].url:find("usr=candidate", 1, true) ~= nil)
requests[#requests].cb(JSON.encode({ code = 0, body = { data = {} } }))
Assert.is_true(result)
Assert.is_true(Auth.expired("ext.ireader"), "候选登录校验不改变现有账号的认证状态")
Assert.is_true(Auth.expired("ireader"), "候选登录校验不改变现有账号的认证状态")
local catalog_opts = { parent = "10", category = "11", order = "score", status = "0" }
Client.catalogAsync(catalog_opts, 2, done)