fixed reference to PathParams

This commit is contained in:
2026-01-18 21:57:14 -07:00
parent 4c25e5e8e9
commit 690923efb3
+3 -2
View File
@@ -74,14 +74,15 @@ func Router(
r.Group("/ui"),
contentDir,
// TODO: move this constructor call up to main.go
// TODO: clean up the references to the templates dir throughout as well (should only be referred to in the 'main' package
new(templater.Templater).With(templater.Config{
Funcs: func(name string, props map[string]any) template.FuncMap {
return template.FuncMap{
// params
"addPathParam": func(k string, v any, args map[string]any) (map[string]any, error) {
pathParams, ok := args["PathParams"].(map[string]string)
pathParams, ok := args["PathParams"].(map[string]any)
if !ok {
return nil, fmt.Errorf("PathParams no set are args: %v", args)
return nil, fmt.Errorf("PathParams not set as args: %v", args)
}
pathParams[k] = fmt.Sprint(v)