From 78bbd9d10473375dc227c864fe8ee2227e6d47d2 Mon Sep 17 00:00:00 2001 From: Zi Nean Teoh Date: Sun, 29 Oct 2023 13:01:42 -0500 Subject: [PATCH] filter by submitted teams, instead of all --- pages/api/teams.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/teams.ts b/pages/api/teams.ts index e98c6758..a4d0e052 100644 --- a/pages/api/teams.ts +++ b/pages/api/teams.ts @@ -26,7 +26,7 @@ export default async function handler( let teams = await Team.find(); if (req.query.submitted) { - teams = teams.filter(team => team.devpost !== ''); + teams = teams.filter(team => team.devpost !== '' && team.devpost !== undefined); } switch (session!.userType) {