public async Task <ActionResult> PutApprove(int id, [FromBody] Transport Transport) { try { VerifyUser(); _validateService.Validate(Transport); Transport transportToUpdate = await _TransportService.GetSingleById(id); await _TransportService.ApproveStatus(transportToUpdate, Transport); return(NoContent()); } catch (ServiceValidationExeption e) { var result = new ResultFormatter(API_VERSION, General.BAD_REQUEST_STATUS_CODE, General.BAD_REQUEST_MESSAGE) .Fail(e); return(BadRequest(result)); } catch (Exception e) { var result = new ResultFormatter(API_VERSION, General.INTERNAL_ERROR_STATUS_CODE, e.Message) .Fail(); return(StatusCode(General.INTERNAL_ERROR_STATUS_CODE, result)); } }