public async Task <IActionResult> PatchExpense([FromRoute] Guid carId, Guid expenseId,
                                                       [FromBody] PatchExpenseRequest request)
        {
            var result =
                await _expenseService.UpdateExpenseByIdAsync(carId, expenseId, HttpContext.GetUserId(), request);

            return(GenerateResponse(result));
        }
Esempio n. 2
0
        public async Task <ServiceResult <ExpenseResponse> > UpdateExpenseAsync(PatchExpenseRequest request, string carId, string expenseId)
        {
            var uri = string.Format(Url, carId) + $"/{expenseId}";

            return(await _requestSenderService.SendAuthPatchRequestAsync <ExpenseResponse>(uri, request));
        }