From b782522f331078e9fa1df311fefa9e0384b92509 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: Mon, 11 Nov 2024 17:21:17 -0500 Subject: [PATCH] fix(api): fix `replaceOrUpdateContent` call not matching the required signature --- server/api/story/[id]/[chapter]/index.put.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/story/[id]/[chapter]/index.put.ts b/server/api/story/[id]/[chapter]/index.put.ts index 2709ec7..3e94b14 100644 --- a/server/api/story/[id]/[chapter]/index.put.ts +++ b/server/api/story/[id]/[chapter]/index.put.ts @@ -4,7 +4,7 @@ import { messages } from "@server/constants"; import { storyQuerier } from "@server/dbHelpers"; import { isLoggedIn } from "@server/middlewareButNotReally"; import { canModify } from "@server/middlewareButNotReally/storyPrivileges"; -import { replaceOrUploadContent, bodyHandler } from "@server/storyHelpers"; +import { replaceOrUploadContent, bodyHandler, getBucket } from "@server/storyHelpers"; import { Story } from "@models/stories"; export default eventHandler(async (ev) => { @@ -20,7 +20,7 @@ export default eventHandler(async (ev) => { const cc: FormChapter = body.chapters[0]; const cid = story.chapters[ev.context.chapterIndex].id; const content = await bodyHandler(cc); - await replaceOrUploadContent(cid!, content); + await replaceOrUploadContent(cid!, content, getBucket()); let ns; try { ns = await Story.findOneAndUpdate(