public DataResponse <WebApiServerState> GetServerState([FromBody] object request)
 {
     if (request == null)
     {
         return(ResponseBase.InvalidInput <DataResponse <WebApiServerState> >("参数错误"));
     }
     return(new DataResponse <WebApiServerState> {
         StateCode = 200,
         ReasonPhrase = "Ok",
         Description = "成功",
         Data = WebApiRoot.GetServerState()
     });
 }
Ejemplo n.º 2
0
 public DataResponse <WebApiServerState> GetServerState(SignRequest request)
 {
     if (request == null)
     {
         return(ResponseBase.InvalidInput <DataResponse <WebApiServerState> >("参数错误"));
     }
     if (!IsValidAdmin(request, out DataResponse <WebApiServerState> response))
     {
         return(response);
     }
     return(new DataResponse <WebApiServerState> {
         StateCode = 200,
         ReasonPhrase = "Ok",
         Description = "成功",
         Data = WebApiRoot.GetServerState()
     });
 }