elTesto/internal/routes/routes.go
2025-03-24 05:39:02 -06:00

21 lines
525 B
Go

package routes
import (
"elTesto/internal/handlers"
"elTesto/internal/middlewares"
"github.com/gin-gonic/gin"
)
func SetupRoutes(router *gin.Engine) {
// Configura el directorio de archivos estáticos
router.Static("/static", "./internal/views/static")
userRoutes := router.Group("/users")
{
userRoutes.POST("/register", handlers.RegisterUser)
userRoutes.POST("/login", handlers.LoginUser)
userRoutes.GET("/", middlewares.AuthMiddleware, handlers.GetUsers)
userRoutes.GET("/view", handlers.ShowUsers)
}
}