Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 5ac38e6

Browse files
committed
Fix
1 parent 44e5484 commit 5ac38e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NET6CustomLibrary/Extensions/DependencyInjection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ public static IServiceCollection AddDbContextUseMySql<TDbContext>(this IServiceC
141141
#endregion
142142

143143
#region "DATABASE HEALTH CHECKS"
144-
public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection services, string connectionString)
144+
public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection services, string connectionString, string nameAsyncCheck)
145145
{
146146
services.AddHealthChecks()
147-
.AddAsyncCheck("MySQL", async () =>
147+
.AddAsyncCheck(nameAsyncCheck, async () =>
148148
{
149149
try
150150
{
@@ -162,9 +162,9 @@ public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection se
162162
return services;
163163
}
164164

165-
public static IEndpointRouteBuilder AddDatabaseHealthChecks(this IEndpointRouteBuilder builder)
165+
public static IEndpointRouteBuilder AddDatabaseHealthChecks(this IEndpointRouteBuilder builder, string pattern)
166166
{
167-
builder.MapHealthChecks("/health", new HealthCheckOptions
167+
builder.MapHealthChecks(pattern, new HealthCheckOptions
168168
{
169169
ResponseWriter = async (context, report) =>
170170
{

0 commit comments

Comments
 (0)