Add proxy for managing tiles

This commit is contained in:
Eli Ribble 2026-03-11 14:28:59 +00:00
parent d6407933f8
commit 3743d63692
No known key found for this signature in database
10 changed files with 316 additions and 198 deletions

View file

@ -2,9 +2,12 @@ package sync
import (
"context"
"fmt"
"html/template"
"net/http"
"github.com/Gleipnir-Technology/nidus-sync/background"
"github.com/Gleipnir-Technology/nidus-sync/config"
"github.com/Gleipnir-Technology/nidus-sync/db/models"
"github.com/Gleipnir-Technology/nidus-sync/html"
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
@ -13,6 +16,7 @@ import (
type contentReviewPool struct {
ArcgisAccessToken string
URLTiles template.HTMLAttr
}
type contentReviewRoot struct{}
@ -30,6 +34,7 @@ func getReviewPool(ctx context.Context, r *http.Request, org *models.Organizatio
}
return html.NewResponse("sync/review/pool.html", contentReviewPool{
ArcgisAccessToken: access_token,
URLTiles: template.HTMLAttr(fmt.Sprintf(`url-tiles="%s"`, config.MakeURLNidus("/api/tile/{z}/{y}/{x}"))),
}), nil
}
func getReviewRoot(ctx context.Context, r *http.Request, org *models.Organization, user *models.User) (*html.Response[contentReviewRoot], *nhttp.ErrorWithStatus) {