18 lines
602 B
Go
18 lines
602 B
Go
package site
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
func RegisterRoutes(rg *gin.RouterGroup, h *Handler, requireAdmin gin.HandlerFunc) {
|
|
group := rg.Group("/admin/site-settings")
|
|
group.GET("", h.Get)
|
|
group.PUT("", requireAdmin, h.Update)
|
|
group.PUT("/appearance", requireAdmin, h.UpdateAppearance)
|
|
group.PUT("/customer-auth", requireAdmin, h.UpdateCustomerAuth)
|
|
}
|
|
|
|
// RegisterPublicRoutes exposes the site identity (name, description)
|
|
// under a plain, non-admin-prefixed path for the storefront to read.
|
|
func RegisterPublicRoutes(rg *gin.RouterGroup, h *Handler) {
|
|
rg.GET("/site-settings", h.Get)
|
|
}
|