2023-12-24 11:40:18 +00:00
|
|
|
package ui
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GroupWeb(router *gin.Engine) *gin.Engine {
|
|
|
|
router.GET("/index.html", index)
|
|
|
|
router.GET("/", index)
|
|
|
|
router.POST("/", index)
|
|
|
|
router.GET("/login.html", getLogin)
|
|
|
|
router.POST("/login.html", postLogin)
|
2024-01-07 14:10:47 +00:00
|
|
|
router.GET("/profile/", getProfile)
|
|
|
|
router.GET("/logout.html", getLogout)
|
2024-01-07 11:23:35 +00:00
|
|
|
file := router.Group("/file")
|
2023-12-30 14:28:54 +00:00
|
|
|
file.GET("/", getFileListPage)
|
2024-01-05 13:05:58 +00:00
|
|
|
file.GET("/empty.html", empty)
|
2023-12-30 14:28:54 +00:00
|
|
|
file.GET("/new/", getNewFile)
|
|
|
|
file.POST("/new/upload", postNewFileUpload)
|
|
|
|
file.POST("/new/download", postNewFileDownload)
|
|
|
|
file.POST("/new/browser", postNewFileBrowser)
|
2024-01-14 19:37:49 +00:00
|
|
|
file.GET("/:id/", getFileView)
|
|
|
|
file.GET("/:id/title", getFileViewEditName)
|
|
|
|
file.GET("/:id/comment", getFileViewEditComment)
|
|
|
|
file.POST("/:id/title", putFileViewName)
|
|
|
|
file.POST("/:id/comment", putFileViewComment)
|
2024-01-07 11:23:35 +00:00
|
|
|
browser := router.Group("/browser")
|
|
|
|
browser.GET("/:id", getBrowser)
|
|
|
|
router.Any("/ct/:id/*any", getContainer)
|
2023-12-24 11:40:18 +00:00
|
|
|
|
|
|
|
return router
|
|
|
|
}
|