File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,20 +9,13 @@ public static class WebApplicationExtensions
99{
1010 public static WebApplication MapVersionApiEndpoints ( this WebApplication app )
1111 {
12- var controller = new InfoController ( ) ;
13-
14- app . MapGet ( "/api/info" , [ AllowAnonymous ] ( ) => HandleRequest ( c=> c . Info ( ) ) ) ;
15-
16- app . MapGet ( "/api/info/version" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . Version ( ) ) ) ;
17-
18- app . MapGet ( "/api/info/productversion" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . ProductVersion ( ) ) ) ;
19-
20- app . MapGet ( "/api/info/shields/version" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . InfoShields ( ) ) ) ;
21-
22- app . MapGet ( "/api/info/shields/productversion" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . ProductVersionShields ( ) ) ) ;
23-
24- app . MapGet ( "/api/info/status" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . Status ( ) ) ) ;
25-
12+ var infoGroup = app . MapGroup ( "/api/info" ) . WithTags ( "Version" ) ;
13+ infoGroup . MapGet ( "/" , [ AllowAnonymous ] ( ) => HandleRequest ( c=> c . Info ( ) ) ) ;
14+ infoGroup . MapGet ( "/version" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . Version ( ) ) ) ;
15+ infoGroup . MapGet ( "/productversion" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . ProductVersion ( ) ) ) ;
16+ infoGroup . MapGet ( "/shields/version" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . InfoShields ( ) ) ) ;
17+ infoGroup . MapGet ( "/shields/productversion" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . ProductVersionShields ( ) ) ) ;
18+ infoGroup . MapGet ( "/status" , [ AllowAnonymous ] ( ) => HandleRequest ( c => c . Status ( ) ) ) ;
2619 return app ;
2720 }
2821
You can’t perform that action at this time.
0 commit comments