Make public report and sync share static assets

It just seems useful
This commit is contained in:
Eli Ribble 2026-01-14 00:39:46 +00:00
parent 81dabdf097
commit d60db93bf2
No known key found for this signature in database
11 changed files with 2 additions and 12 deletions

View file

@ -12,9 +12,6 @@ import (
//go:embed template/*
var embeddedFiles embed.FS
//go:embed static/*
var EmbeddedStaticFS embed.FS
var components = [...]string{"header", "map"}
func buildTemplate(files ...string) *htmlpage.BuiltTemplate {

View file

@ -1,8 +1,6 @@
package sync
import (
"net/http"
"github.com/Gleipnir-Technology/nidus-sync/api"
"github.com/Gleipnir-Technology/nidus-sync/auth"
"github.com/Gleipnir-Technology/nidus-sync/htmlpage"
@ -68,9 +66,7 @@ func Router() chi.Router {
r.Method("GET", "/cell/{cell}", auth.NewEnsureAuth(getCellDetails))
r.Method("GET", "/settings", auth.NewEnsureAuth(getSettings))
r.Method("GET", "/source/{globalid}", auth.NewEnsureAuth(getSource))
//r.Method("GET", "/vector-tiles/{org_id}/{tileset_id}/{zoom}/{x}/{y}.{format}", auth.NewEnsureAuth(getVectorTiles))
localFS := http.Dir("./sync/static")
htmlpage.FileServer(r, "/static", localFS, EmbeddedStaticFS, "static")
htmlpage.AddStaticRoute(r, "/static")
return r
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long