Frontend form handling done

This commit is contained in:
Leons Aleksandrovs
2025-07-05 21:11:09 +03:00
parent 58d53b17cb
commit a42e61fb48
22 changed files with 338 additions and 35 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
package routes
import (
"net/http"
"backend/controllers"
"github.com/gin-gonic/gin"
)
@@ -9,11 +9,11 @@ import (
func SetupRoutes() *gin.Engine {
r := gin.Default()
r.GET("/ping", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "pong",
})
})
// Controllers
users := controllers.User{}
// Guest routes (Register, Login, check auth)
r.POST("/register", users.Register)
return r
}