From 47f7df3c658b746a871f4eae99b0782ee6079cb0 Mon Sep 17 00:00:00 2001 From: Mark Watson Date: Wed, 4 Oct 2023 21:03:45 -0300 Subject: [PATCH] return nothing if no budget exits --- api/src/controllers/BudgetsController.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/api/src/controllers/BudgetsController.ts b/api/src/controllers/BudgetsController.ts index 8937258..81dbafe 100644 --- a/api/src/controllers/BudgetsController.ts +++ b/api/src/controllers/BudgetsController.ts @@ -26,10 +26,6 @@ class BudgetsController { static getMyBudget: ActionFunction = async (req, res, next) => { const account = AuthService.getAccountFromLocals(res.locals); const budget = await BudgetsService.getMyBudgetByUserId(account._id); - if (!budget) { - res.status(400).send({ message: 'Budget not found' }); - return; - } res.status(200).send(budget); };