summaryrefslogtreecommitdiff
path: root/internal/router/api-v1-general-page-bottom-embeds.go
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'internal/router/api-v1-general-page-bottom-embeds.go')
-rw-r--r--internal/router/api-v1-general-page-bottom-embeds.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/router/api-v1-general-page-bottom-embeds.go b/internal/router/api-v1-general-page-bottom-embeds.go
index c4d9543..df766a7 100644
--- a/internal/router/api-v1-general-page-bottom-embeds.go
+++ b/internal/router/api-v1-general-page-bottom-embeds.go
@@ -38,7 +38,7 @@ func Api_V1_GeneralPage_BottomEmbeds(l map[string]*locale.LocaleConfig, langs []
}
pathParts := strings.Split(strings.Trim(path, "/"), "/")
- if len(pathParts) == 0 {
+ if len(pathParts) < 2 {
return c.Status(fiber.ErrBadRequest.Code).SendString("'Referer' header is invalid: expect format '/{lang}/...'")
}
@@ -58,8 +58,6 @@ func Api_V1_GeneralPage_BottomEmbeds(l map[string]*locale.LocaleConfig, langs []
additionalTemplates = append(additionalTemplates, "views/pages/blog-catalogue.html")
} else if len(pathParts) == 3 && pathParts[1] == "blog" {
additionalTemplates = append(additionalTemplates, "views/pages/blog-page.html")
- } else if len(pathParts) == 1 {
- additionalTemplates = append(additionalTemplates, "views/pages/home-page.html")
}
content, err := tm.Render("general-page-bottom-embeds", values, additionalTemplates...)