work in progress: image serving

This commit is contained in:
2025-09-14 15:19:47 -06:00
parent 166408b660
commit 3fe226938c
4 changed files with 50 additions and 0 deletions
+2
View File
@@ -20,6 +20,8 @@ func AmWrap(myfunc func(AmContext) (string, any, error)) echo.HandlerFunc {
what, rc, err := myfunc(amctxt)
if err == nil {
switch what {
case "bytes":
err = ctxt.Blob(amctxt.RC(), amctxt.OutputType(), rc.([]byte))
case "string":
err = ctxt.String(amctxt.RC(), fmt.Sprintf("%v", rc))
case "template":