public async Task <ActionResult <Result> > DeleteDebt(long debtId) { var result = await _debtService.DeleteDebt(new DebtDto { Id = debtId }); if (!result.Succeeded) { return(BadRequest(result)); } return(Ok(result)); }
public async Task <IActionResult> Delete(int id) { ServiceResponse <List <Debt> > response = await _debtService.DeleteDebt(id); if (response.Data == null) { return(NotFound(response)); } return(Ok(response)); }