2026-02-27 16:17:48 +00:00
|
|
|
package sync
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
2026-03-20 22:47:03 +00:00
|
|
|
"fmt"
|
|
|
|
|
"html/template"
|
2026-02-27 16:17:48 +00:00
|
|
|
"net/http"
|
|
|
|
|
|
2026-03-20 22:47:03 +00:00
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/config"
|
2026-03-03 17:08:58 +00:00
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/html"
|
|
|
|
|
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
|
2026-03-12 23:49:16 +00:00
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/platform"
|
2026-03-20 22:47:03 +00:00
|
|
|
//"github.com/rs/zerolog/log"
|
2026-02-27 16:17:48 +00:00
|
|
|
)
|
|
|
|
|
|
2026-03-05 19:04:36 +00:00
|
|
|
type contentPlanningRoot struct {
|
2026-03-20 22:47:03 +00:00
|
|
|
URLTiles template.HTMLAttr
|
2026-03-05 19:04:36 +00:00
|
|
|
}
|
2026-02-27 16:17:48 +00:00
|
|
|
|
2026-03-12 23:49:16 +00:00
|
|
|
func getPlanningRoot(ctx context.Context, r *http.Request, user platform.User) (*html.Response[contentPlanningRoot], *nhttp.ErrorWithStatus) {
|
2026-03-05 19:04:36 +00:00
|
|
|
return html.NewResponse("sync/planning-root.html", contentPlanningRoot{
|
2026-03-20 22:47:03 +00:00
|
|
|
URLTiles: template.HTMLAttr(fmt.Sprintf(`url-tiles="%s"`, config.MakeURLNidus("/api/tile/{z}/{y}/{x}"))),
|
2026-03-05 19:04:36 +00:00
|
|
|
}), nil
|
2026-02-27 16:17:48 +00:00
|
|
|
}
|