mirror of
https://github.com/netlight/my-finance-pal-backend.git
synced 2024-11-09 16:41:56 +01:00
Upgrade minor and patch deps
This commit is contained in:
parent
0521bd5522
commit
7f9c7f30f3
3 changed files with 1257 additions and 1070 deletions
|
@ -2,7 +2,7 @@ version: "3.8"
|
|||
services:
|
||||
mongo:
|
||||
restart: always
|
||||
image: mongo:6.0.4
|
||||
image: mongo:6.0.10
|
||||
ports:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import type ExpenseRepository from "../expenseRepository";
|
||||
import { ExpenseEntityConverter } from "../entity/converters";
|
||||
import { BudgetSummaryModel } from "../../budget/mongo/models";
|
||||
import type BudgetSummaryEntity from "../../budget/entity/budgetSummaryEntity";
|
||||
|
||||
export const findAllExpensesForBudget: ExpenseRepository["findAllForBudget"] =
|
||||
async (budgetId) => {
|
||||
const budgetExpenses: Pick<BudgetSummaryEntity, "expenses"> | null =
|
||||
await BudgetSummaryModel.findOne({
|
||||
id: budgetId.value,
|
||||
}).select("expenses");
|
||||
const budgetExpenses = await BudgetSummaryModel.findOne({
|
||||
id: budgetId.value,
|
||||
}).select("expenses");
|
||||
if (budgetExpenses !== null) {
|
||||
return budgetExpenses.expenses.map(ExpenseEntityConverter.toDomain);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue