//peer级别 //[Authorize(Roles = "Peer")] public override async Task <NetResponse> Transaction(NetRequest request, ServerCallContext context) { try { var model = Newtonsoft.Json.JsonConvert.DeserializeObject <QMBlockSDK.TX.TxRequest>(request.Data); var rs = await _txService.Transaction(model); return(new NetResponse() { Data = Newtonsoft.Json.JsonConvert.SerializeObject(rs) }); } catch (Exception ex) { _logger.LogError(ex, ex.Message); var rs = new QMBlockSDK.TX.TxResponse(); rs.Msg = ex.Message; rs.Status = false; return(new NetResponse() { Data = Newtonsoft.Json.JsonConvert.SerializeObject(rs) }); } }
//peer级别 //[Authorize(Roles = "Peer")] public async Task <JsonResult> Transaction(TxRequest model) { var rs = await _txService.Transaction(model); return(new JsonResult(rs)); }