Skip to content

Commit

Permalink
Added endpoint registration for classic startup. Fixes #1844
Browse files Browse the repository at this point in the history
  • Loading branch information
tidyui committed Mar 31, 2022
1 parent 2a7ae06 commit 8dd2928
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup Label="Package information">
<Version>10.0.3</Version>
<Version>10.0.4</Version>
<Authors>Piranha CMS</Authors>
<Company>Piranha CMS</Company>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ public static IApplicationBuilder UsePiranha(this IApplicationBuilder builder, A

options?.Invoke(applicationBuilder);

// Configure all registered endpoints
applicationBuilder.Builder.UseEndpoints(endpoints =>
{
foreach (var endpoint in applicationBuilder.Endpoints)
{
endpoint.Invoke(endpoints);
}
});
return applicationBuilder.Builder;
}

Expand All @@ -75,7 +83,7 @@ public static WebApplication UsePiranha(this WebApplication app, Action<PiranhaA

// Configure all registered endpoints
application.Builder.UseEndpoints(endpoints =>
{
{
foreach (var endpoint in application.Endpoints)
{
endpoint.Invoke(endpoints);
Expand Down

0 comments on commit 8dd2928

Please sign in to comment.