diff --git a/cmd/dashboard/controller/controller.go b/cmd/dashboard/controller/controller.go index 7468ce4c..a26f317a 100644 --- a/cmd/dashboard/controller/controller.go +++ b/cmd/dashboard/controller/controller.go @@ -84,7 +84,7 @@ func routers(r *gin.Engine, frontendDist fs.FS) { auth.POST("/terminal", commonHandler(createTerminal)) auth.GET("/ws/terminal/:id", commonHandler(terminalStream)) - auth.GET("/file", commonHandler(createFM)) + auth.POST("/file", commonHandler(createFM)) auth.GET("/ws/file/:id", commonHandler(fmStream)) auth.GET("/profile", commonHandler(getProfile)) diff --git a/cmd/dashboard/controller/fm.go b/cmd/dashboard/controller/fm.go index 638dcb7b..4cb3b078 100644 --- a/cmd/dashboard/controller/fm.go +++ b/cmd/dashboard/controller/fm.go @@ -24,7 +24,7 @@ import ( // @Param id query uint true "Server ID" // @Produce json // @Success 200 {object} model.CreateFMResponse -// @Router /file [get] +// @Router /file [post] func createFM(c *gin.Context) (*model.CreateFMResponse, error) { idStr := c.Query("id") id, err := strconv.ParseUint(idStr, 10, 64)