33 lines
948 B
Go
33 lines
948 B
Go
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)
|
|
router.GET("/profile/", getProfile)
|
|
router.GET("/logout.html", getLogout)
|
|
file := router.Group("/file")
|
|
file.GET("/", getFileListPage)
|
|
file.GET("/empty.html", empty)
|
|
file.GET("/new/", getNewFile)
|
|
file.POST("/new/upload", postNewFileUpload)
|
|
file.POST("/new/download", postNewFileDownload)
|
|
file.POST("/new/browser", postNewFileBrowser)
|
|
file.GET("/:id/", getFileView)
|
|
file.GET("/:id/title", getFileViewEditName)
|
|
file.GET("/:id/comment", getFileViewEditComment)
|
|
file.POST("/:id/title", putFileViewName)
|
|
file.POST("/:id/comment", putFileViewComment)
|
|
browser := router.Group("/browser")
|
|
browser.GET("/:id", getBrowser)
|
|
router.Any("/ct/:id/*any", getContainer)
|
|
|
|
return router
|
|
}
|