2026-01-13 20:26:15 +00:00
|
|
|
package sync
|
|
|
|
|
|
|
|
|
|
import (
|
2026-03-21 05:38:42 +00:00
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/static"
|
2026-04-01 16:19:11 +00:00
|
|
|
"github.com/gorilla/mux"
|
2026-01-13 20:26:15 +00:00
|
|
|
)
|
|
|
|
|
|
2026-04-01 16:19:11 +00:00
|
|
|
func Router(r *mux.Router) {
|
2026-01-13 20:26:15 +00:00
|
|
|
// Unauthenticated endpoints
|
2026-04-14 23:41:40 +00:00
|
|
|
r.HandleFunc("/oauth/arcgis/begin", getArcgisOauthBegin)
|
2026-04-14 23:43:53 +00:00
|
|
|
r.HandleFunc("/oauth/arcgis/callback", getArcgisOauthCallback)
|
2026-04-01 16:19:11 +00:00
|
|
|
r.HandleFunc("/mailer/pool/random", getMailerPoolRandom)
|
|
|
|
|
r.HandleFunc("/mailer/mode-1", getMailer1)
|
|
|
|
|
r.HandleFunc("/mailer/mode-2", getMailer2)
|
|
|
|
|
r.HandleFunc("/mailer/mode-3/{code}", getMailer3)
|
|
|
|
|
r.HandleFunc("/mailer/mode-1/preview", getMailer1Preview)
|
|
|
|
|
r.HandleFunc("/mailer/mode-2/preview", getMailer2Preview)
|
|
|
|
|
r.HandleFunc("/mailer/mode-3/{code}/preview", getMailer3Preview)
|
2026-01-13 20:26:15 +00:00
|
|
|
|
2026-02-10 16:24:37 +00:00
|
|
|
// Utility endpoints
|
2026-04-01 16:19:11 +00:00
|
|
|
r.HandleFunc("/privacy", getPrivacy)
|
2026-01-13 20:26:15 +00:00
|
|
|
|
2026-04-07 14:56:31 +00:00
|
|
|
//r.HandleFunc("/", getRoot)
|
|
|
|
|
//r.HandleFunc("/_/*", getRoot)
|
2026-01-13 20:26:15 +00:00
|
|
|
|
2026-03-21 05:38:42 +00:00
|
|
|
static.AddStaticRoute(r, "/static")
|
2026-04-08 17:49:32 +00:00
|
|
|
r.PathPrefix("/").Handler(static.SinglePageApp("static/gen/sync")).Methods("GET")
|
2026-01-13 20:26:15 +00:00
|
|
|
}
|