☙◦ The Tablet ❀ GamerGirlandCo ◦❧
088232f750
create an index file which exports the functions we need in one accessible place
11 lines
292 B
TypeScript
11 lines
292 B
TypeScript
import { listQuerier } from "~/lib/server/dbHelpers";
|
|
|
|
export default cachedEventHandler(async (ev) => {
|
|
const id = parseInt(getRouterParam(ev, "id")!);
|
|
let s = await listQuerier({ author: { $in: [id] } }, ev.context, ev);
|
|
return {
|
|
stories: s.stories,
|
|
total: s.stories.length,
|
|
};
|
|
});
|