initial ai assistance
This commit is contained in:
1 parent
1af9ec3172
commit
2e0bf1e88e
24 files changed
+1293
-60
No files matched your search
+3
-3
@@ -100,9 +100,9 @@ export function createMockCms(opts: MockOptions = {}) {
|
||||
return json(200, { ...res, patches })
|
||||
}
|
||||
if (path === '/api/publish-roots' && m === 'POST') {
|
||||
const body = (await req.json()) as { roots: string[] }
|
||||
published.push(...body.roots)
|
||||
return json(200, { published: body.roots })
|
||||
const body = (await req.json()) as { ids: string[] }
|
||||
published.push(...body.ids)
|
||||
return json(200, { publishedAt: new Date().toISOString(), results: body.ids.map((id) => ({ id })) })
|
||||
}
|
||||
if (path === '/api/preview' && !previewApi) return json(404, { error: 'no such route' })
|
||||
if (path === '/api/preview' || (m === 'GET' && req.headers.get('accept')?.includes('text/html'))) {
|
||||
|
||||
Reference in new issue
Block a user