mirror of
https://github.com/netlight/my-finance-pal-backend.git
synced 2024-11-12 17:44:15 +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:
|
services:
|
||||||
mongo:
|
mongo:
|
||||||
restart: always
|
restart: always
|
||||||
image: mongo:6.0.4
|
image: mongo:6.0.10
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
import type ExpenseRepository from "../expenseRepository";
|
import type ExpenseRepository from "../expenseRepository";
|
||||||
import { ExpenseEntityConverter } from "../entity/converters";
|
import { ExpenseEntityConverter } from "../entity/converters";
|
||||||
import { BudgetSummaryModel } from "../../budget/mongo/models";
|
import { BudgetSummaryModel } from "../../budget/mongo/models";
|
||||||
import type BudgetSummaryEntity from "../../budget/entity/budgetSummaryEntity";
|
|
||||||
|
|
||||||
export const findAllExpensesForBudget: ExpenseRepository["findAllForBudget"] =
|
export const findAllExpensesForBudget: ExpenseRepository["findAllForBudget"] =
|
||||||
async (budgetId) => {
|
async (budgetId) => {
|
||||||
const budgetExpenses: Pick<BudgetSummaryEntity, "expenses"> | null =
|
const budgetExpenses = await BudgetSummaryModel.findOne({
|
||||||
await BudgetSummaryModel.findOne({
|
id: budgetId.value,
|
||||||
id: budgetId.value,
|
}).select("expenses");
|
||||||
}).select("expenses");
|
|
||||||
if (budgetExpenses !== null) {
|
if (budgetExpenses !== null) {
|
||||||
return budgetExpenses.expenses.map(ExpenseEntityConverter.toDomain);
|
return budgetExpenses.expenses.map(ExpenseEntityConverter.toDomain);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue