diff --git a/server/api/story/[id]/index.put.ts b/server/api/story/[id]/index.put.ts index 1407938..0765362 100644 --- a/server/api/story/[id]/index.put.ts +++ b/server/api/story/[id]/index.put.ts @@ -33,7 +33,7 @@ export default eventHandler(async (ev) => { const update: Partial = { title: body.title, completed: body.completed, - coAuthor: body.coAuthor, + coAuthor: !!body.coAuthor ? body.coAuthor : null, chapters: [], }; for (const oc of os.chapters) {