From 07ed91b2a10f325d17e75beb33e3b5096814fac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Mar 2024 15:32:58 -0400 Subject: [PATCH] fix(api): move `replaceOrUploadContent` call out of else block --- server/api/story/[id]/index.put.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/story/[id]/index.put.ts b/server/api/story/[id]/index.put.ts index f19ca92..5ccd22e 100644 --- a/server/api/story/[id]/index.put.ts +++ b/server/api/story/[id]/index.put.ts @@ -46,8 +46,8 @@ export default eventHandler(async (ev) => { id: os.chapters[idx].id, posted: os.chapters[idx].posted, }); - await replaceOrUploadContent(os.chapters![idx].id, cont); } + await replaceOrUploadContent(os.chapters![idx].id, cont); update.chapters![update.chapters!.length - 1].words = countWords(cont); } os = await Story.findOneAndUpdate(