Exemplo n.º 1
0
        public async Task <GtMetrics> MakeGtMetric()
        {
            if (_gtMetricsServices.GetAll().Count() > 0)
            {
                return(null);
            }

            GtMetrics initial = await _gtMetricsServices.Test("kubotausa.com", 1);

            return(initial);
        }
Exemplo n.º 2
0
 public IActionResult Get()
 {
     try
     {
         var gtMetrics = _gtService.GetAll();
         if (gtMetrics == null)
         {
             return(NotFound());
         }
         return(Ok(gtMetrics));
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("GetAllMetrics", ex.Message);
         return(BadRequest(ModelState));
     }
 }