port template engine

This commit is contained in:
orangix
2026-01-19 05:31:43 +01:00
parent 33fa04e98d
commit 3f40c25b04
4 changed files with 115 additions and 120 deletions

View File

@@ -14,7 +14,7 @@ func RenderError(c *fiber.Ctx, code int) error {
if code != 0 {
codeStr = strconv.Itoa(code)
}
img, _ := static.GetFiles().ReadFile("img/error-" + codeStr + ".png")
img, _ := ReadFile("img/error-"+codeStr+".png", static.GetFiles())
c.Set("Content-Type", "image/png")
return c.Status(code).Send(img)
} else {