Files
template-vitrine/backend/internal/modules/auth/customer_routes.go
T
2026-09-14 20:50:19 +02:00

16 lines
683 B
Go

package auth
import "github.com/gin-gonic/gin"
// RegisterCustomerRoutes mounts the customer-space auth endpoints. Deliberately
// NOT called from cmd/api/main.go in this phase: there is no customer-facing
// module (cart/orders) yet, so exposing these routes today would just be a
// dead surface. Wiring is ready for when that module is activated.
func RegisterCustomerRoutes(rg *gin.RouterGroup, h *CustomerHandler, requireCustomer gin.HandlerFunc, loginRateLimit gin.HandlerFunc) {
group := rg.Group("/auth/customer")
group.POST("/login", loginRateLimit, h.Login)
group.POST("/refresh", h.Refresh)
group.POST("/logout", h.Logout)
group.GET("/me", requireCustomer, h.Me)
}