This commit is contained in:
谢宇宁
2026-11-06 00:13:27 +07:00
parent f65d10e998
commit 37411fcada
98 changed files with 958 additions and 4598 deletions
+4 -4
View File
@@ -24,11 +24,11 @@ test('proxy methods and public endpoints are backed by the reviewed API contract
for(const method of ['GET','POST'])for(const path of ['video/detail','video/all/list','playlet/hot/list','playlet/home/config/detail/list','statcenter/sync'])assert.equal(server.allowedRequest(path,method),false,method+' '+path);
});
test('the documented likes list is an authenticated GET endpoint',()=>{
assert.equal(server.allowedRequest('playlet/like/list','GET'),true);
assert.equal(server.allowedRequest('playlet/like/list','POST'),false);
test('member list, coin, recharge, feedback and account endpoints are no longer proxied',()=>{
for(const path of ['playlet/like/list','playlet/collect/list','playlet/history/list','coin/list','recharge/list','feedback/add','user/upload','auth/login','auth/register'])
for(const method of ['GET','POST'])assert.equal(server.allowedRequest(path,method),false,method+' '+path);
assert.equal(server.PUBLIC_PATHS.has('playlet/like/list'),false);
assert.deepEqual(contract['GET playlet/like/list'].query,['pageNum','pageSize']);
assert.equal(server.allowedRequest('auth/guest','POST'),true);
});
test('all public list routes send only supported query fields with their native page numbers',()=>{