diff --git a/.air.toml b/.air.toml index 93fd403..a8a575a 100644 --- a/.air.toml +++ b/.air.toml @@ -5,7 +5,7 @@ tmp_dir = "tmp" [build] args_bin = [] bin = "./tmp/main" - cmd = "go build -o ./tmp/main ." + cmd = "templ generate && go build -o ./tmp/main ." delay = 1000 exclude_dir = ["assets", "tmp", "vendor", "testdata"] exclude_file = [] @@ -21,7 +21,7 @@ tmp_dir = "tmp" poll = false poll_interval = 0 post_cmd = ["rm tmp/main"] - pre_cmd = ["templ generate"] + pre_cmd = [] rerun = false rerun_delay = 500 send_interrupt = false diff --git a/web/ui/routes.go b/web/ui/routes.go index c385c86..8058255 100644 --- a/web/ui/routes.go +++ b/web/ui/routes.go @@ -13,12 +13,18 @@ func GroupWeb(router *gin.Engine) *gin.Engine { 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) - + subnetsGroup := router.Group("/subnets") + subnetsGroup.GET("/", getSubnetsPage) + subnetsGroup.GET("/new") + subnetsGroup.GET("/details/:id") + subnetsGroup.GET("/edit/:id") + subnetsGroup.POST("/edit/:id") + addressGroup := router.Group("/addresses") + addressGroup.GET("/", getSubnetsPage) + addressGroup.GET("/new") + addressGroup.GET("/details/:id") + addressGroup.GET("/edit/:id") + addressGroup.POST("/edit/:id") return router }