File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using Microsoft . AspNetCore . Mvc ;
2+ using Train . Solver . Common . Enums ;
3+ using Train . Solver . Data . Abstractions . Entities ;
4+ using Train . Solver . Data . Abstractions . Repositories ;
5+ using Train . Solver . Infrastructure . Abstractions . Models ;
6+ using Train . Solver . Infrastructure . Extensions ;
7+
8+ namespace Train . Solver . AdminAPI . Endpoints ;
9+
10+ public static class NetworkTypeEndpoints
11+ {
12+ public static RouteGroupBuilder MapNetworkTypeEndpoints ( this RouteGroupBuilder group )
13+ {
14+ group . MapGet ( "/network-types" , GetAllAsync )
15+ . Produces < List < string > > ( ) ;
16+
17+ return group ;
18+ }
19+
20+ private static async Task < IResult > GetAllAsync ( )
21+ {
22+ return Results . Ok ( typeof ( NetworkType ) . GetEnumNames ( ) ) ;
23+ }
24+ }
Original file line number Diff line number Diff line change 125125 . RequireRateLimiting ( "Fixed" )
126126 . WithTags ( "Rate Provider" ) ;
127127
128+ app . MapGroup ( "/api" )
129+ . MapNetworkTypeEndpoints ( )
130+ . RequireRateLimiting ( "Fixed" )
131+ . WithTags ( "Network Type" ) ;
132+
128133app . MapGroup ( "/api" )
129134 . MapTokenPriceEndpoints ( )
130135 . RequireRateLimiting ( "Fixed" )
You can’t perform that action at this time.
0 commit comments