From eabee8a3d206b502e0f9f3aa27ec575b07d6f19e Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Sat, 11 Nov 2023 01:14:19 -0600 Subject: [PATCH] Small fix to at least display event detail --- pages/api/event/[id].ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/api/event/[id].ts b/pages/api/event/[id].ts index 836b31b..cd083b2 100644 --- a/pages/api/event/[id].ts +++ b/pages/api/event/[id].ts @@ -7,6 +7,7 @@ import type { NextApiRequest, NextApiResponse } from 'next'; import { getServerSession } from 'next-auth'; import { authOptions } from '@/pages/api/auth/[...nextauth]'; import mongoose from 'mongoose'; +import VolunteerPrograms from 'bookem-shared/src/models/VolunteerPrograms'; export default async function handler( req: NextApiRequest, @@ -40,6 +41,7 @@ export default async function handler( // TODO: remove this after development await Tags.find({}); + await VolunteerPrograms.find({}); // query event and populate fields with mongoose refs const event = await VolunteerEvents.findById(id)