figure out where to serve static images from and how to handle "wildcard" paths

This commit is contained in:
2025-09-13 23:13:52 -06:00
parent 779f15f069
commit d3d431944b
3 changed files with 17 additions and 0 deletions
+10
View File
@@ -17,9 +17,11 @@ import (
)
type AmContext interface {
RC() int
Render(string) error
SubRender(string) ([]byte, error)
SetRC(int)
URLPath() string
VarMap() jet.VarMap
}
@@ -29,6 +31,10 @@ type amContext struct {
rendervars jet.VarMap
}
func (c *amContext) RC() int {
return c.httprc
}
func (c *amContext) Render(name string) error {
return c.echoContext.Render(c.httprc, name, c)
}
@@ -47,6 +53,10 @@ func (c *amContext) SetRC(rc int) {
c.httprc = rc
}
func (c *amContext) URLPath() string {
return c.echoContext.Request().URL.Path
}
func (c *amContext) VarMap() jet.VarMap {
return c.rendervars
}