Ejemplo n.º 1
0
        public async Task <IActionResult> GetStatus()
        {
            var status = await _healthService.GetHealthStatusAsync();

            return(Ok(new TimeStampIsAliveResponse
            {
                Name = Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationName,
                Version = Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationVersion,
                Env = Program.EnvInfo,
                IsDebug = true,
                IssueIndicators = status.issues
                                  .Select(i => new IsAliveResponse.IssueIndicator
                {
                    Type = i.Type,
                    Value = i.Value
                }),
                Updated = status.updated
            }));
        }