Only show image errors on image direct links

This commit is contained in:
video-prize-ranch 2024-02-05 16:26:54 -05:00
parent 1579e59dca
commit fb82afc7dd
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ import (
) )
func RenderError(c *fiber.Ctx, code int) error { func RenderError(c *fiber.Ctx, code int) error {
if !strings.Contains(c.Get("Accept"), "html") { if !strings.Contains(c.Get("Accept"), "html") && c.Params("extension") != "" {
codeStr := "generic" codeStr := "generic"
if code != 0 { if code != 0 {
codeStr = strconv.Itoa(code) codeStr = strconv.Itoa(code)