Form validation

This commit is contained in:
Eden Kirin
2024-01-21 21:06:26 +01:00
parent eda1d02418
commit abde90ee33
7 changed files with 407 additions and 89 deletions

View File

@ -10,7 +10,7 @@ import (
const (
APPHOST string = "127.0.0.1"
APPPORT int = 8000
APPPORT int = 8080
STATIC_PATH string = "./static"
)
@ -27,6 +27,7 @@ func initRouter() *gin.Engine {
interactiveRouter.GET("", handlers.Interactive)
interactiveRouter.GET("/swap-content", handlers.InteractiveSwapContent)
interactiveRouter.GET("/filter-cat-breeds", handlers.FilterCatBreeds)
interactiveRouter.POST("/validate-form", handlers.ValidateForm)
}
router.Use(static.Serve("/static", static.LocalFile(STATIC_PATH, false)))