初始提交:ai-review 项目当前版本(含赛道一/二提交规范修订与时间节点文档)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
const BASE = 'http://localhost:3002';
|
||||
const SID = '48e1344e-9616-4bf2-b177-d779bddad2e8';
|
||||
|
||||
async function main() {
|
||||
const login = await fetch(`${BASE}/api/auth/login`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ password: '620f4c96' })
|
||||
});
|
||||
const { token } = await login.json();
|
||||
const auth = { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` };
|
||||
|
||||
const r = await fetch(`${BASE}/api/standards/${SID}`, { headers: auth });
|
||||
const s = await r.json();
|
||||
console.log('Standard:', JSON.stringify({
|
||||
id: s.id,
|
||||
name: s.name,
|
||||
category_tag: s.category_tag,
|
||||
content_length: s.content?.length
|
||||
}, null, 2));
|
||||
|
||||
// Parse content
|
||||
const dims = s.content.split('\n').filter(l => l.startsWith('## '));
|
||||
console.log('Dimensions from content:', dims.length);
|
||||
for (const d of dims) {
|
||||
console.log(' -', d.replace('## ', ''));
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
Reference in New Issue
Block a user