mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans, usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0. Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
31 lines
806 B
Go
31 lines
806 B
Go
package cdn
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/zap-proto/zip"
|
|
|
|
"github.com/hanzoai/commerce/api/cdn/analytics"
|
|
"github.com/hanzoai/commerce/api/cdn/form"
|
|
"github.com/hanzoai/commerce/api/cdn/native"
|
|
)
|
|
|
|
func Route(r *zip.Group, args ...zip.Handler) {
|
|
a := r.Group("/a/")
|
|
a.Raw(http.MethodGet, ":organizationid", analytics.Js)
|
|
a.Raw(http.MethodGet, ":organizationid/analytics.js", analytics.Js)
|
|
a.Raw(http.MethodGet, ":organizationid/js", analytics.Js)
|
|
|
|
f := r.Group("/f/")
|
|
f.Raw(http.MethodGet, ":formid/form.js", form.Js)
|
|
f.Raw(http.MethodGet, ":formid/js", form.Js)
|
|
|
|
// DEPRECATED
|
|
m := r.Group("/m/")
|
|
m.Raw(http.MethodGet, ":formid/mailinglist.js", form.Js)
|
|
m.Raw(http.MethodGet, ":formid/js", form.Js)
|
|
|
|
n := r.Group("/n/")
|
|
n.Raw(http.MethodGet, ":organizationid/native.js", native.Js)
|
|
}
|