From 96a0d36bef888000baf82987ba43b2650cedc433 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: Wed, 6 Dec 2023 21:52:04 -0500 Subject: [PATCH] fix(api): update user stories endpoint it now takes into account the new return type for `listQuerier` --- server/api/user/[id]/stories.get.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/user/[id]/stories.get.ts b/server/api/user/[id]/stories.get.ts index 24dd936..bfe578d 100644 --- a/server/api/user/[id]/stories.get.ts +++ b/server/api/user/[id]/stories.get.ts @@ -2,8 +2,8 @@ import listQuerier from "~/lib/server/dbHelpers/listQuerier"; export default cachedEventHandler(async (ev) => { const id = parseInt(getRouterParam(ev, "id")!); - let s = await listQuerier({ author: { $in: [id] } }, ev.context); - const t = s.map((a) => a.toObject()); + let s = await listQuerier({ author: { $in: [id] } }, ev.context, ev); + const t = s.stories.map((a) => a.toObject()); return { stories: t, total: t.length,