feat(help-center): expose public article show

This commit is contained in:
2026-06-06 08:14:34 +08:00
parent d8aa26bcbc
commit 8edfcda947
10 changed files with 201 additions and 10 deletions
+4 -1
View File
@@ -361,6 +361,9 @@ var criticalRoutes = []route{
{Method: "GET", Path: "/hc/:slug/:locale/categories/:category_slug", Controller: "public/api/v1/portals/categories#show", Source: "routes.rb:596"},
{Method: "GET", Path: "/hc/:slug/:locale/categories/:category_slug/articles", Controller: "public/api/v1/portals/articles#index", Source: "routes.rb:597"},
{Method: "GET", Path: "/hc/:slug/:locale/categories/:category_slug/articles.json", Controller: "public/api/v1/portals/articles#index", Source: "routes.rb:597"},
{Method: "GET", Path: "/hc/:slug/articles/:article_slug.png", Controller: "public/api/v1/portals/articles#tracking_pixel", Source: "routes.rb:598"},
{Method: "GET", Path: "/hc/:slug/articles/:article_slug.md", Controller: "public/api/v1/portals/articles#show_markdown", Source: "routes.rb:599"},
{Method: "GET", Path: "/hc/:slug/articles/:article_slug", Controller: "public/api/v1/portals/articles#show", Source: "routes.rb:601"},
{Method: "POST", Path: "/api/v2/accounts/", Controller: "api/v2/accounts#create", Source: "routes.rb:478"},
{Method: "GET", Path: "/api/v2/accounts/:account_id/summary_reports/agent", Controller: "api/v2/accounts/summary_reports#agent", Source: "routes.rb:481"},
@@ -500,7 +503,7 @@ func writeParity(path string, gochatPath string, chatwootPath string, gochatRout
b.WriteString("These routes exist at the same path but with a compatible HTTP method. Rails resource `update` routes expose both `PATCH` and `PUT`; GoChat currently exposes only one method for some update endpoints. Keep these tracked until both methods are registered or the frontend is proven to call only the implemented method.\n\n")
writeRouteTable(&b, methodCompatible, gochatRoutes, "method-compatible")
b.WriteString("\n## Parameter-Compatible Routes\n\n")
b.WriteString("These routes exist with equivalent method and path shape but different parameter names. They need handler/serializer parity review, and exact external path compatibility must be preserved.\n\n")
b.WriteString("These routes exist with equivalent method and path shape but different parameter names or a Gin-compatible suffix dispatcher. They need handler/serializer parity review, and exact external path compatibility must be preserved.\n\n")
writeRouteTable(&b, compatible, gochatRoutes, "parameter-compatible")
b.WriteString("\n## Exact Critical Routes\n\n")
writeRouteTable(&b, exact, gochatRoutes, "exact")