fix(api): update user stories endpoint

it now takes into account the new return type for `listQuerier`
This commit is contained in:
parent 43f16b026d
commit 96a0d36bef
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

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