mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-10 05:28:12 -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.GET("/server", listHandler(listServer))
|
||||||
auth.PATCH("/server/:id", commonHandler(updateServer))
|
auth.PATCH("/server/:id", commonHandler(updateServer))
|
||||||
auth.GET("/server/:id/config", commonHandler(getServerConfig))
|
auth.GET("/server/config/:id", commonHandler(getServerConfig))
|
||||||
auth.POST("/server/:id/config", commonHandler(setServerConfig))
|
auth.POST("/server/config", commonHandler(setServerConfig))
|
||||||
auth.POST("/batch-delete/server", commonHandler(batchDeleteServer))
|
auth.POST("/batch-delete/server", commonHandler(batchDeleteServer))
|
||||||
auth.POST("/force-update/server", commonHandler(forceUpdateServer))
|
auth.POST("/force-update/server", commonHandler(forceUpdateServer))
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ func forceUpdateServer(c *gin.Context) (*model.ForceUpdateResponse, error) {
|
|||||||
// @Tags auth required
|
// @Tags auth required
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} model.CommonResponse[string]
|
// @Success 200 {object} model.CommonResponse[string]
|
||||||
// @Router /server/{id}/config [get]
|
// @Router /server/config/{id} [get]
|
||||||
func getServerConfig(c *gin.Context) (string, error) {
|
func getServerConfig(c *gin.Context) (string, error) {
|
||||||
idStr := c.Param("id")
|
idStr := c.Param("id")
|
||||||
id, err := strconv.ParseUint(idStr, 10, 64)
|
id, err := strconv.ParseUint(idStr, 10, 64)
|
||||||
|
Loading…
Reference in New Issue
Block a user