Added MidrandBooks project

This commit is contained in:
Khwezi Mngoma
2026-05-24 13:38:47 +02:00
parent 70c6e0bfbc
commit f67f5eaf53
17 changed files with 241 additions and 46 deletions
@@ -4,7 +4,7 @@ namespace LiteCharms.Features.TechShop.HealthChecks;
public class PostgresShopHealthCheck(IConfiguration configuration) : IHealthCheck
{
private readonly string connectionString = configuration.GetConnectionString(ShopDbConfigName)!;
private readonly string connectionString = configuration.GetConnectionString(TechShopDbConfigName)!;
public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
{
@@ -18,11 +18,11 @@ public class PostgresShopHealthCheck(IConfiguration configuration) : IHealthChec
await command.ExecuteScalarAsync(cancellationToken);
return HealthCheckResult.Healthy($"{ShopDbConfigName} is responsive.");
return HealthCheckResult.Healthy($"{TechShopDbConfigName} is responsive.");
}
catch (Exception ex)
{
return HealthCheckResult.Unhealthy($"{ShopDbConfigName} is unreachable.", ex);
return HealthCheckResult.Unhealthy($"{TechShopDbConfigName} is unreachable.", ex);
}
}
}