corrected updating expense to return all data)
This commit is contained in:
parent
ee823d015b
commit
13b4e07f14
2 changed files with 3 additions and 2 deletions
|
|
@ -12,6 +12,6 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"name": "Tag Three"
|
||||
"name": "Joe"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue