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
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user