goipam/web/ui/routes.go

25 lines
673 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.GET("/logout.html", getLogout)
router.POST("/login.html", postLogin)
router.GET("/profile/", getProfile)
router.GET("/empty.html", getEmpty)
subnetGroup := router.Group("/subnets")
subnetGroup.GET("/", getSubnetsPage)
subnetGroup.GET("/subnets/details/:id", getSubnetDetails)
subnetGroup.GET("/subnets/details/:id/:field", getSubnetDetailsField)
subnetGroup.POST("/subnets/details/:id/:field", postSubnetDetailsField)
return router
}