diff --git a/src/routes/stories.ts b/src/routes/stories.ts index 85be0d9..daf8bb2 100644 --- a/src/routes/stories.ts +++ b/src/routes/stories.ts @@ -77,12 +77,10 @@ export function storiesRouter({ store }: { store: StoryStore }): Router { return void res.status(404).json({ error: "story not found" }); const issues = analyze(story.doc); if (hasErrors(issues)) { - return void res - .status(422) - .json({ - error: "story has errors; fix them before publishing", - issues, - }); + return void res.status(422).json({ + error: "story has errors; fix them before publishing", + issues, + }); } const updated = await store.setPublished(story.id, true); res.json({ story: updated, issues });