public async Task <IActionResult> Get(int groupId, int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await transactionsService.Get(User, groupId, id); return(HandleGetResult(result, false)); }
public async Task <IActionResult> GetTransaction([FromRoute] Guid transactionId) { if (!ModelState.IsValid) { return(BadRequest()); } var transaction = await _transactionsService.Get(transactionId); if (transaction == null) { return(NotFound()); } return(Ok(transaction)); }
public async Task <IActionResult> Get() { var response = await _serviceTransaction.Get(); if (response.ResponseH.Result != ResultTypeHelper.ResultMsg.OK) { var message = new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent(response.ResponseH.ErrText) }; return(BadRequest(message)); } else { return(Ok(response.DataH)); } }
public IActionResult Get(Guid id) { return(Ok(_transactionsService.Get(id))); }