Skip to content

Commit

Permalink
Small fix to at least display event detail
Browse files Browse the repository at this point in the history
  • Loading branch information
JiashuHarryHuang committed Nov 11, 2023
1 parent b5ecdd6 commit eabee8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/api/event/[id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit eabee8a

Please sign in to comment.