package units import "github.com/gin-gonic/gin" func RegisterAdminRoutes(rg *gin.RouterGroup, h *Handler, requireAdmin gin.HandlerFunc) { group := rg.Group("/admin/units", requireAdmin) group.GET("", h.List) group.POST("", h.Create) group.PUT("/:id", h.Update) group.DELETE("/:id", h.Delete) } // RegisterPublicRoutes exposes the read-only unit list so the storefront // can render price-tier labels (e.g. "3.5 g", "10 mg"). func RegisterPublicRoutes(rg *gin.RouterGroup, h *Handler) { rg.GET("/units", h.List) }