diff options
| author | wikiapiserver | 2026-06-26 01:20:29 +0200 |
|---|---|---|
| committer | wikiapiserver | 2026-06-26 01:20:29 +0200 |
| commit | e7bbed2d3b7d06700b0b4d9009f695e0cdf03e40 (patch) | |
| tree | a3cb5e14f9505f8005c9c2877b002aeda097b785 | |
| parent | 4907cfb72ef69fb94c49cfb484a5a2907db0dee8 (diff) | |
| download | wikiapiserver-e7bbed2d3b7d06700b0b4d9009f695e0cdf03e40.tar.gz | |
fix: remove invalid project filter from article API call
The filters[project]=en.wikipedia.org parameter caused timeouts and
empty responses. The filter value was incorrect for the Wikimedia
Enterprise API.
Articles from 404-list.test that genuinely don't exist on Wikipedia
(e.g. TV episodes without standalone articles) still return 404 —
this is expected behavior from the upstream API.
| -rw-r--r-- | api/handlers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/handlers.go b/api/handlers.go index 93f605e..d3a08fd 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -228,7 +228,7 @@ func (h *Handler) GetArticle(w http.ResponseWriter, r *http.Request) { } baseURL := "https://api.enterprise.wikimedia.com/v2/structured-contents/" + url.QueryEscape(article) - queryURL := baseURL + "?limit=1&filters[project]=en.wikipedia.org" + queryURL := baseURL + "?limit=1" req, err := http.NewRequestWithContext(ctx, "GET", queryURL, nil) if err != nil { |
