Get basic bones of the nuisance page copied from the mock

This commit is contained in:
Eli Ribble 2026-01-30 20:41:02 +00:00
parent 48c49fc73e
commit bab8af4572
No known key found for this signature in database
12 changed files with 371 additions and 452 deletions

View file

@ -6,6 +6,7 @@ import (
"strconv"
"time"
"github.com/Gleipnir-Technology/nidus-sync/config"
"github.com/Gleipnir-Technology/nidus-sync/db"
"github.com/Gleipnir-Technology/nidus-sync/db/enums"
"github.com/Gleipnir-Technology/nidus-sync/db/models"
@ -15,8 +16,12 @@ import (
"github.com/rs/zerolog/log"
)
type ContextNuisance struct{}
type ContextNuisanceSubmitComplete struct {
type ContentNuisance struct {
District *ContentDistrict
MapboxToken string
URL ContentURL
}
type ContentNuisanceSubmitComplete struct {
ReportID string
}
@ -29,7 +34,11 @@ func getNuisance(w http.ResponseWriter, r *http.Request) {
html.RenderOrError(
w,
Nuisance,
ContextNuisance{},
ContentNuisance{
District: nil,
MapboxToken: config.MapboxToken,
URL: makeContentURL(),
},
)
}
func getNuisanceSubmitComplete(w http.ResponseWriter, r *http.Request) {
@ -37,7 +46,7 @@ func getNuisanceSubmitComplete(w http.ResponseWriter, r *http.Request) {
html.RenderOrError(
w,
NuisanceSubmitComplete,
ContextNuisanceSubmitComplete{
ContentNuisanceSubmitComplete{
ReportID: report,
},
)