nidus-sync/sync/review.go

32 lines
1.1 KiB
Go
Raw Permalink Normal View History

package sync
import (
"context"
2026-03-11 14:28:59 +00:00
"fmt"
"html/template"
"net/http"
2026-03-11 14:28:59 +00:00
"github.com/Gleipnir-Technology/nidus-sync/config"
"github.com/Gleipnir-Technology/nidus-sync/html"
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
"github.com/Gleipnir-Technology/nidus-sync/platform"
//"github.com/rs/zerolog/log"
)
2026-03-10 18:05:07 +00:00
type contentReviewPool struct {
URLTiles template.HTMLAttr
2026-03-10 18:05:07 +00:00
}
type contentReviewRoot struct{}
func getReviewPool(ctx context.Context, r *http.Request, user platform.User) (*html.Response[contentReviewPool], *nhttp.ErrorWithStatus) {
2026-03-10 18:05:07 +00:00
return html.NewResponse("sync/review/pool.html", contentReviewPool{
URLTiles: template.HTMLAttr(fmt.Sprintf(`url-tiles="%s"`, config.MakeURLNidus("/api/tile/{z}/{y}/{x}"))),
2026-03-10 18:05:07 +00:00
}), nil
2026-03-06 18:56:05 +00:00
}
func getReviewRoot(ctx context.Context, r *http.Request, user platform.User) (*html.Response[contentReviewRoot], *nhttp.ErrorWithStatus) {
2026-03-06 18:56:05 +00:00
return html.NewResponse("sync/review/root.html", contentReviewRoot{}), nil
}
func getReviewSite(ctx context.Context, r *http.Request, user platform.User) (*html.Response[contentReviewRoot], *nhttp.ErrorWithStatus) {
2026-03-11 23:39:25 +00:00
return html.NewResponse("sync/review/site.html", contentReviewRoot{}), nil
}