fix(page-data): isolate owner API from public pages
This commit is contained in:
@@ -121,19 +121,19 @@ test('acceptance: agent dataset registry + owner read/insert via Page Data API',
|
||||
await setupWorkspace(workspaceRoot);
|
||||
const app = buildApp(workspaceRoot);
|
||||
|
||||
const datasets = await request(app, 'GET', '/api/page-data', {
|
||||
const datasets = await request(app, 'GET', '/api/admin/page-data', {
|
||||
headers: { 'x-test-user': '1' },
|
||||
});
|
||||
assert.equal(datasets.status, 200);
|
||||
assert.equal(datasets.body.data.datasets[0].name, 'leads');
|
||||
|
||||
const inserted = await request(app, 'POST', '/api/page-data/leads/rows', {
|
||||
const inserted = await request(app, 'POST', '/api/admin/page-data/leads/rows', {
|
||||
headers: { 'x-test-user': '1' },
|
||||
body: { name: 'Owner 线索', note: '内部' },
|
||||
});
|
||||
assert.equal(inserted.status, 201);
|
||||
|
||||
const listed = await request(app, 'GET', '/api/page-data/leads?limit=10', {
|
||||
const listed = await request(app, 'GET', '/api/admin/page-data/leads?limit=10', {
|
||||
headers: { 'x-test-user': '1' },
|
||||
});
|
||||
assert.equal(listed.status, 200);
|
||||
@@ -237,7 +237,7 @@ test('acceptance: apply-publish creates policy for published page', async () =>
|
||||
await setupWorkspace(workspaceRoot);
|
||||
const app = buildApp(workspaceRoot);
|
||||
|
||||
const applied = await request(app, 'POST', `/api/page-data/policies/${PAGE_ID}/apply-publish`, {
|
||||
const applied = await request(app, 'POST', `/api/admin/page-data/policies/${PAGE_ID}/apply-publish`, {
|
||||
headers: { 'x-test-user': '1' },
|
||||
body: {
|
||||
datasetName: 'leads',
|
||||
|
||||
Reference in New Issue
Block a user