File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
package router
2
2
3
3
import (
4
- "fmt"
5
4
"github.com/kataras/iris/v12"
6
5
"github.com/scutrobotlab/rm-schedule/internal/common"
7
6
"github.com/scutrobotlab/rm-schedule/internal/handler"
@@ -45,10 +44,9 @@ func Router(r *iris.Application, frontend string) {
45
44
api .Get ("/static/*path" , handler .RMStaticHandler )
46
45
api .Get ("/mp/match" , handler .MpMatchHandler )
47
46
api .Get ("/rank" , handler .RankListHandler )
48
-
49
- for name , param := range Params {
50
- api .Get (fmt .Sprintf ("/%s" , name ), handler .RouteHandlerFactory (param ))
51
- }
47
+ api .Get ("/group_rank_info" , handler .RouteHandlerFactory (Params [common .UpstreamNameGroupRankInfo ]))
48
+ api .Get ("/robot_data" , handler .RouteHandlerFactory (Params [common .UpstreamNameRobotData ]))
49
+ api .Get ("/schedule" , handler .RouteHandlerFactory (Params [common .UpstreamNameSchedule ]))
52
50
53
51
r .HandleDir ("/" , iris .Dir (frontend ), iris.DirOptions {
54
52
IndexName : "index.html" ,
You can’t perform that action at this time.
0 commit comments