refactor: remove dataset cron records

This commit is contained in:
2026-07-23 23:08:25 +08:00
parent 3705d75e59
commit fbd142803a
14 changed files with 125 additions and 380 deletions

View File

@@ -281,28 +281,17 @@ await page.route('http://localhost:9150/api/v1/**', async (route) => {
await route.fulfill({ json: updated })
return
}
if (url.pathname === '/api/v1/dataset-crons/sync') {
if (url.pathname === '/api/v1/dataset-sources/sync') {
await route.fulfill({
status: 200,
json: visualDatasetSources.map((source, index) => ({
id: `019b0000-0000-7000-8000-${String(70 + index).padStart(12, '0')}`,
json: visualDatasetSources.map((source) => ({
sourceId: source.id,
schedule: '@once',
status: 'completed',
enabled: false,
nextRunAt: null,
lastRunAt: new Date().toISOString(),
lastResult: 'format=rss fetched=2 inserted=0',
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
result: 'format=rss fetched=2 inserted=0',
})),
})
return
}
if (url.pathname === '/api/v1/dataset-crons' && route.request().method() === 'GET') {
await route.fulfill({ json: [] })
return
}
await route.fulfill({ status: 404, json: { error: { code: 'not_found', message: '视觉检查未配置该接口' } } })
})