chore: clear lint and sync admin story views

This commit is contained in:
2026-04-18 12:35:37 +08:00
parent bb575a7fe9
commit 9e1a17fa67
16 changed files with 670 additions and 355 deletions

View File

@@ -154,14 +154,15 @@ async function generateStory() {
universe_id: selectedUniverseId.value || undefined
})
storybookStore.setStorybook(response)
close()
router.push('/storybook/view')
} else {
const result = await api.post<any>('/api/generate/full', payload)
const query: Record<string, string> = {}
if (result.errors && Object.keys(result.errors).length > 0) {
if (result.errors.image) query.imageError = '1'
storybookStore.setStorybook(response)
close()
const storybookPath = response.id ? `/storybook/view/${response.id}` : '/storybook/view'
router.push(storybookPath)
} else {
const result = await api.post<any>('/api/stories/generate/full', payload)
const query: Record<string, string> = {}
if (result.errors && Object.keys(result.errors).length > 0) {
if (result.errors.image) query.imageError = '1'
}
close()
router.push({ path: `/story/${result.id}`, query })