Skip to content

Commit

Permalink
return nothing if no budget exits
Browse files Browse the repository at this point in the history
  • Loading branch information
markCwatson committed Oct 5, 2023
1 parent f576e1e commit 47f7df3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions api/src/controllers/BudgetsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 47f7df3

Please sign in to comment.