fix route

This commit is contained in:
uubulb 2025-02-01 18:12:47 +08:00
parent 9b17c6deee
commit af5466651a
2 changed files with 3 additions and 3 deletions

View File

@ -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))

View File

@ -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)