Skip to content

Commit

Permalink
Fix display of upcoming and current events
Browse files Browse the repository at this point in the history
  • Loading branch information
JiashuHarryHuang committed May 15, 2024
1 parent a90587d commit bbb91fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/api/events/upcoming-current.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default async function handler(

// select the events that user signed up for but are still in the application process
const inProgressApplications = await ApplicationResponse.find({
volunteer: session.user._id,
user: session.user._id,
});

const inProgressApplicationEventIds = inProgressApplications.map(
Expand All @@ -63,6 +63,8 @@ export default async function handler(
],
}).sort({ startDate: 1 });

console.log(events);

return res.status(200).json(events);
} catch (error) {
console.error(error);
Expand Down

0 comments on commit bbb91fe

Please sign in to comment.