Move handler objects to common location to share with RMO

This commit is contained in:
Eli Ribble 2026-03-03 17:08:58 +00:00
parent 87fe5ec2e5
commit 0f6da8e25f
No known key found for this signature in database
33 changed files with 449 additions and 308 deletions

View file

@ -54,7 +54,7 @@ func addMock(r chi.Router, path string, template string) {
}
type contentMock struct {
Config contentConfig
Config html.ContentConfig
DistrictName string
URLs ContentMockURLs
}
@ -66,7 +66,7 @@ func renderMock(template_name string) http.HandlerFunc {
code = "abc-123"
}
data := contentMock{
Config: newContentConfig(),
Config: html.NewContentConfig(),
DistrictName: "Delta MVCD",
URLs: ContentMockURLs{
Dispatch: "/mock/dispatch",
@ -91,13 +91,13 @@ func renderMock(template_name string) http.HandlerFunc {
}
type contentMockList struct {
Config contentConfig
Config html.ContentConfig
Mocks []mock
}
func renderMockList(w http.ResponseWriter, r *http.Request) {
data := contentMockList{
Config: newContentConfig(),
Config: html.NewContentConfig(),
Mocks: mocks,
}
html.RenderOrError(w, "sync/mock/root.html", data)