Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Oct 30, 2023
1 parent 77c19d4 commit 83d8c48
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/mcs/scheduling/server/apis/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (s *Service) RegisterSchedulersRouter() {
router := s.root.Group("schedulers")
router.GET("", getSchedulers)
router.GET("/diagnostic/:name", getDiagnosticResult)
router.GET("/config/:name/:suffix", getSchedulerConfigByName)
router.GET("/config/:name", getSchedulerConfigByName)
// TODO: in the future, we should split pauseOrResumeScheduler to two different APIs.
// And we need to do one-to-two forwarding in the API middleware.
router.POST("/:name", pauseOrResumeScheduler)
Expand Down Expand Up @@ -414,8 +414,7 @@ func getSchedulerConfigByName(c *gin.Context) {
c.String(http.StatusNotFound, errs.ErrSchedulerNotFound.GenWithStackByArgs().Error())
return
}
suffix := c.Param("suffix")
c.Request.URL.Path = "/" + suffix
c.Request.URL.Path = "/list"
handlers[name].ServeHTTP(c.Writer, c.Request)
}

Expand Down

0 comments on commit 83d8c48

Please sign in to comment.