Backend structure / login with JWT

This commit is contained in:
Leons Aleksandrovs
2025-07-06 16:46:21 +03:00
parent 3166424426
commit 3003a961b6
18 changed files with 338 additions and 126 deletions
+3 -5
View File
@@ -1,7 +1,7 @@
package routes
import (
"backend/controllers"
"backend/controllers/user"
"github.com/gin-gonic/gin"
)
@@ -9,11 +9,9 @@ import (
func SetupRoutes() *gin.Engine {
r := gin.Default()
// Controllers
users := controllers.User{}
// Guest routes (Register, Login, check auth)
r.POST("/register", users.Register)
r.POST("/register", user.Register)
r.POST("/login", user.Login)
return r
}