fix(expenses): small fix update
This commit is contained in:
parent
2958403f08
commit
5bfeaaf4de
|
|
@ -3,8 +3,7 @@ import { ExpenseUpsertService } from "src/time-and-attendance/expenses/services/
|
|||
import { ExpenseDto } from "src/time-and-attendance/expenses/dtos/expense-create.dto";
|
||||
import { RolesAllowed } from "src/common/decorators/roles.decorators";
|
||||
import { GLOBAL_CONTROLLER_ROLES } from "src/common/shared/role-groupes";
|
||||
import { Result } from "src/common/errors/result-error.factory";
|
||||
import { GetExpenseDto } from "src/time-and-attendance/expenses/dtos/expense-get.dto";
|
||||
import { Result } from "src/common/errors/result-error.factory";
|
||||
|
||||
@Controller('expense')
|
||||
@RolesAllowed(...GLOBAL_CONTROLLER_ROLES)
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export class ExpenseUpsertService {
|
|||
|
||||
//push updates and get updated datas
|
||||
const expense = await this.prisma.expenses.update({
|
||||
where: { id: dto.id, timesheet_id: dto.timesheet_id },
|
||||
where: { id: dto.id, timesheet_id: timesheet.id },
|
||||
data,
|
||||
select: expense_select,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user