From 9023b2dd6223d81d7655fddb934d8d9663b0e6f9 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Sat, 27 Apr 2024 00:26:52 -0500 Subject: [PATCH] Optimize query a little --- pages/api/applications.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/applications.ts b/pages/api/applications.ts index 90336ee..509c017 100644 --- a/pages/api/applications.ts +++ b/pages/api/applications.ts @@ -34,7 +34,7 @@ export default async function handler( case 'GET': try { await dbConnect(); - await VolunteerEvents.find({}); + await VolunteerEvents.findOne({}); // query volunteerApplication by event id attributes const applicationResponses = await ApplicationResponse.find({