Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions WrapThat.Version/WebApplicationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@ public static class WebApplicationExtensions
{
public static WebApplication MapVersionApiEndpoints(this WebApplication app)
{
var controller = new InfoController();

app.MapGet("/api/info", [AllowAnonymous] () => HandleRequest(c=>c.Info()));

app.MapGet("/api/info/version", [AllowAnonymous] () => HandleRequest(c => c.Version()));

app.MapGet("/api/info/productversion", [AllowAnonymous] () => HandleRequest(c => c.ProductVersion()));

app.MapGet("/api/info/shields/version", [AllowAnonymous] () => HandleRequest(c => c.InfoShields()));

app.MapGet("/api/info/shields/productversion", [AllowAnonymous] () => HandleRequest(c => c.ProductVersionShields()));

app.MapGet("/api/info/status", [AllowAnonymous] () => HandleRequest(c => c.Status()));

var infoGroup = app.MapGroup("/api/info").WithTags("Version");
infoGroup.MapGet("/", [AllowAnonymous] () => HandleRequest(c=>c.Info()));
infoGroup.MapGet("/version", [AllowAnonymous] () => HandleRequest(c => c.Version()));
infoGroup.MapGet("/productversion", [AllowAnonymous] () => HandleRequest(c => c.ProductVersion()));
infoGroup.MapGet("/shields/version", [AllowAnonymous] () => HandleRequest(c => c.InfoShields()));
infoGroup.MapGet("/shields/productversion", [AllowAnonymous] () => HandleRequest(c => c.ProductVersionShields()));
infoGroup.MapGet("/status", [AllowAnonymous] () => HandleRequest(c => c.Status()));
return app;
}

Expand Down
Loading