From 81258d39db6530699194f860206528c6f09a5238 Mon Sep 17 00:00:00 2001 From: wikiapiserver Date: Thu, 25 Jun 2026 15:42:32 +0200 Subject: feat: GET /article endpoint proxies Wikimedia structured contents GET /article?username=alice&name=en.wikipedia/Sun → proxies to api.enterprise.wikimedia.com/v2/structured-contents/{name} with Authorization: Bearer Returns 401 for unknown users, 400 if params missing, and passes through the upstream HTTP status on errors. --- main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'main.go') diff --git a/main.go b/main.go index f2cf44d..341a175 100644 --- a/main.go +++ b/main.go @@ -87,6 +87,7 @@ func main() { mux.HandleFunc("POST /refresh", handler.Refresh) mux.HandleFunc("GET /health", handler.Health) mux.HandleFunc("GET /token", handler.GetToken) + mux.HandleFunc("GET /article", handler.GetArticle) addr := fmt.Sprintf(":%d", cfg.Server.Port) srv := &http.Server{ -- cgit v1.2.3