corrected updating expense to return all data)

This commit is contained in:
Joe Arndt 2026-02-22 23:15:12 -06:00
parent ee823d015b
commit 13b4e07f14
2 changed files with 3 additions and 2 deletions

View file

@ -12,6 +12,6 @@ post {
body:json {
{
"name": "Tag Three"
"name": "Joe"
}
}

View file

@ -23,7 +23,8 @@ export class ExpenseDataService {
}
public async update(expense: UpdateExpense): Promise<Expense> {
return await this.expenses.save(expense);
await this.expenses.save(expense);
return await this.expenses.findOneBy({ id: expense.id }) as Expense;
}
public async delete(id: string): Promise<void> {