public async Task <GtMetrics> MakeGtMetric() { if (_gtMetricsServices.GetAll().Count() > 0) { return(null); } GtMetrics initial = await _gtMetricsServices.Test("kubotausa.com", 1); return(initial); }
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)); } }