generated from nholtware/service-template-express
style: prettier format stories route
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
806e893076
commit
aec6488d8c
1 changed files with 4 additions and 6 deletions
|
|
@ -77,9 +77,7 @@ 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({
|
||||
return void res.status(422).json({
|
||||
error: "story has errors; fix them before publishing",
|
||||
issues,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue