public async Task <ActionResult <DebtDto> > GetDebtById(long id) { var vm = await _debtService.GetDebtById(id); if (vm == null) { return(BadRequest(Result.Failure(new List <string> { "No valid debt was found" }))); } return(Ok(vm)); }
public async Task <IActionResult> GetSingle(int id) { return(Ok(await _debtService.GetDebtById(id))); }