mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-08 20:48:13 -05:00
fix route
This commit is contained in:
parent
9b17c6deee
commit
af5466651a
@ -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))
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user