@@ -26,21 +26,22 @@ public static void MapDashboardEndpoints<TTimeTicker, TCronTicker>(this IEndpoin
2626 where TCronTicker : CronTickerEntity , new ( )
2727 {
2828 // New authentication endpoints
29- endpoints . MapGet ( "/api/auth/info" , GetAuthInfo )
29+ WithGroupNameIfSet ( endpoints . MapGet ( "/api/auth/info" , GetAuthInfo )
3030 . WithName ( "GetAuthInfo" )
3131 . WithSummary ( "Get authentication configuration" )
3232 . WithTags ( "TickerQ Dashboard" )
3333 . RequireCors ( "TickerQ_Dashboard_CORS" )
34- . AllowAnonymous ( ) ;
34+ . AllowAnonymous ( ) , config ) ;
3535
36- endpoints . MapPost ( "/api/auth/validate" , ValidateAuth )
36+ WithGroupNameIfSet ( endpoints . MapPost ( "/api/auth/validate" , ValidateAuth )
3737 . WithName ( "ValidateAuth" )
3838 . WithSummary ( "Validate authentication credentials" )
3939 . WithTags ( "TickerQ Dashboard" )
4040 . RequireCors ( "TickerQ_Dashboard_CORS" )
41- . AllowAnonymous ( ) ;
41+ . AllowAnonymous ( ) , config ) ;
4242
4343 var apiGroup = endpoints . MapGroup ( "/api" ) . WithTags ( "TickerQ Dashboard" ) . RequireCors ( "TickerQ_Dashboard_CORS" ) ;
44+ WithGroupNameIfSet ( apiGroup , config ) ;
4445
4546 // Apply authentication if configured
4647 if ( config . Auth . Mode == AuthMode . Host )
@@ -202,6 +203,16 @@ public static void MapDashboardEndpoints<TTimeTicker, TCronTicker>(this IEndpoin
202203
203204 }
204205 #region Endpoint Handlers
206+
207+ private static IEndpointConventionBuilder WithGroupNameIfSet ( IEndpointConventionBuilder builder , DashboardOptionsBuilder config )
208+ {
209+ if ( ! string . IsNullOrWhiteSpace ( config . GroupName ) )
210+ {
211+ builder . WithGroupName ( config . GroupName ) ;
212+ }
213+
214+ return builder ;
215+ }
205216
206217 private static IResult GetAuthInfo ( IAuthService authService , DashboardOptionsBuilder dashboardOptions )
207218 {
0 commit comments