Пример #1
0
 public ActionResult <string> Get()
 {
     try {
         _logger.LogInformation(string.Format("/healthz: healthcheck heartbeat"));
         if (_systemGroupRepo.HealthStatus())
         {
             return(Ok("ok"));
         }
         else
         {
             return(BadRequest("database error"));
         }
     }
     catch (Exception ex) {
         _logger.LogError(ex, "Healthz check failed!");
         return(BadRequest("Improper API configuration"));
     }
 }