figure out where to serve static images from and how to handle "wildcard" paths
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user