Skip to content

Commit

Permalink
馃悶 fix: 404 error template wasn't displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
shurco committed Jul 31, 2023
1 parent 089b50d commit d7b007b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/routes/not_found_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ func NotFoundRoute(a *fiber.App) {
if strings.HasPrefix(c.Path(), "/api") {
return webutil.Response(c, fiber.StatusNotFound, "Not Found", nil)
}
return c.Status(fiber.StatusNotFound).Render("error/404", fiber.Map{}, "site/layouts/clear")
if strings.HasPrefix(c.Path(), "/_") {
return c.Status(fiber.StatusNotFound).Render("admin/404", fiber.Map{}, "admin/layouts/clear")
}
return c.Status(fiber.StatusNotFound).Render("site/404", fiber.Map{}, "site/layouts/clear")
})
}

0 comments on commit d7b007b

Please sign in to comment.