☙◦ The Tablet ❀ GamerGirlandCo ◦❧
088232f750
create an index file which exports the functions we need in one accessible place
11 lines
316 B
TypeScript
11 lines
316 B
TypeScript
import { storyQuerier } from "~/lib/server/dbHelpers";
|
|
import { Review } from "~/models/stories/review";
|
|
|
|
export default eventHandler(async (ev) => {
|
|
let story = await storyQuerier(ev);
|
|
return await Review.find({
|
|
whichChapter: story.chapters[ev.context.chapterIndex || 0].id,
|
|
replyingTo: null,
|
|
}).exec();
|
|
});
|