diff --git a/internal/docs/http_handler.go b/internal/docs/http_handler.go index 8957632..d670dfd 100644 --- a/internal/docs/http_handler.go +++ b/internal/docs/http_handler.go @@ -110,6 +110,7 @@ func (h *HTTPHandler) ShowAPIEndpoint(c echo.Context, endpointPath string) error // Get endpoint data for the explorer endpointInfo, err := h.docs.GetAPIEndpointData(endpointPath) + _ = endpointInfo if err != nil { // Endpoint not found in explorer data, fall back to old behavior return h.showLegacyAPIEndpoint(c, endpointPath, isLoggedIn) @@ -168,16 +169,10 @@ func (h *HTTPHandler) ShowAPIEndpoint(c echo.Context, endpointPath string) error } } - // Create API explorer data - explorerData := templates.APIExplorerData{ - Endpoint: *endpointInfo, - IsLoggedIn: isLoggedIn, - } - - // Render API endpoint page with explorer + // Render API endpoint page var buf bytes.Buffer currentPath := c.Request().URL.Path - err = templates.DocsLayoutWithExplorer(*nav, *doc, user, explorerData, currentPath).Render(c.Request().Context(), &buf) + err = templates.DocsLayout(*nav, *doc, user, currentPath).Render(c.Request().Context(), &buf) if err != nil { return c.HTML(http.StatusInternalServerError, "Failed to render page") diff --git a/templates/docs.templ b/templates/docs.templ index e5e4e2e..740d185 100644 --- a/templates/docs.templ +++ b/templates/docs.templ @@ -18,7 +18,7 @@ templ DocsLayout(nav Navigation, doc Document, user User, currentPath string) { -
+ @Header(user, currentPath)