diff --git a/cmd/dashboard/controller/controller.go b/cmd/dashboard/controller/controller.go index b883c0f..ba268f9 100644 --- a/cmd/dashboard/controller/controller.go +++ b/cmd/dashboard/controller/controller.go @@ -110,8 +110,8 @@ func routers(r *gin.Engine, frontendDist fs.FS) { auth.GET("/server", listHandler(listServer)) auth.PATCH("/server/:id", commonHandler(updateServer)) - auth.GET("/server/:id/config", commonHandler(getServerConfig)) - auth.POST("/server/:id/config", commonHandler(setServerConfig)) + auth.GET("/server/config/:id", commonHandler(getServerConfig)) + auth.POST("/server/config", commonHandler(setServerConfig)) auth.POST("/batch-delete/server", commonHandler(batchDeleteServer)) auth.POST("/force-update/server", commonHandler(forceUpdateServer)) diff --git a/cmd/dashboard/controller/server.go b/cmd/dashboard/controller/server.go index 3916dbc..e7b0e96 100644 --- a/cmd/dashboard/controller/server.go +++ b/cmd/dashboard/controller/server.go @@ -224,7 +224,7 @@ func forceUpdateServer(c *gin.Context) (*model.ForceUpdateResponse, error) { // @Tags auth required // @Produce json // @Success 200 {object} model.CommonResponse[string] -// @Router /server/{id}/config [get] +// @Router /server/config/{id} [get] func getServerConfig(c *gin.Context) (string, error) { idStr := c.Param("id") id, err := strconv.ParseUint(idStr, 10, 64)