From c3d525bb0791e80c774c878a9dae64113d3b8a0f Mon Sep 17 00:00:00 2001 From: Davide Bizzi Date: Fri, 2 Aug 2024 10:47:35 +0200 Subject: [PATCH] feat: Don't show spots if cap -1 --- src/routes/users/me/campaigns/_get/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/users/me/campaigns/_get/index.ts b/src/routes/users/me/campaigns/_get/index.ts index 83e942d80..787a1c333 100644 --- a/src/routes/users/me/campaigns/_get/index.ts +++ b/src/routes/users/me/campaigns/_get/index.ts @@ -453,7 +453,7 @@ class RouteItem extends UserRoute<{ ); return { ...campaign, - ...(applicationSpot + ...(applicationSpot && applicationSpot.cap >= 0 ? { freeSpots: applicationSpot.cap - (validApplicationsCount?.count || 0),