Skip to content

Commit

Permalink
Fixed missing Health check endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Jan 30, 2025
1 parent c5681c1 commit e054fd7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/ApiHost1/ApiHostModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@
namespace ApiHost1;

/// <summary>
/// Provides a module for common services of a API host
/// Provides a module for common services of an API host,
/// such as the <see cref="HealthApi" /> endpoints.
/// </summary>
public class ApiHostModule : ISubdomainModule
{
public Action<WebApplication, List<MiddlewareRegistration>> ConfigureMiddleware
{
get
{
// The TestingOnlyApiModule is already used in TESTINGONLY, and it registers the endpoints of this module already.
// We do not want to create duplicate endpoints here.
#if !TESTINGONLY
return (app, _) => app.RegisterRoutes();
#else
return (_, _) =>
{
// Add you host specific middleware here
// Add your host specific middleware here
};
#endif
}
}

public Assembly? DomainAssembly => null;
public Assembly? DomainAssembly => null; // No domain assembly

public Dictionary<Type, string> EntityPrefixes => new();

Expand Down

0 comments on commit e054fd7

Please sign in to comment.