fix(api): move replaceOrUploadContent call out of else block

This commit is contained in:
parent b10928fcf7
commit 07ed91b2a1
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -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(