aboutsummaryrefslogtreecommitdiff
path: root/internal/frontend/server.go
diff options
context:
space:
mode:
authorEthan Lee <ethanalee@google.com>2026-03-11 21:04:11 +0000
committerGopher Robot <gobot@golang.org>2026-03-23 09:41:31 -0700
commitc43b677a694ff5791b1b696298c9e29ae6d221bb (patch)
treef980f6f50b3251785b6b1925516147a4e9d52e32 /internal/frontend/server.go
parent21d5c77a01c8874095d68e8c10a03c100fcd2070 (diff)
downloadgo-x-pkgsite-c43b677a694ff5791b1b696298c9e29ae6d221bb.tar.xz
internal/api: implement module versions endpoint
- Implement module versions endpoint using ds.GetVersionsForPath - Introduce paginate helper to generalize paginaton logic - Update fakedatasource to correctly use V1Path to return all versions Change-Id: Icc028bf8ca9c13978bb6eba84afe9736ccd6bcee Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/754862 Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ethan Lee <ethanalee@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'internal/frontend/server.go')
-rw-r--r--internal/frontend/server.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/frontend/server.go b/internal/frontend/server.go
index 00dc7ad6..b229af0d 100644
--- a/internal/frontend/server.go
+++ b/internal/frontend/server.go
@@ -238,6 +238,7 @@ func (s *Server) Install(handle func(string, http.Handler), cacher Cacher, authV
handle("GET /vuln/", vulnHandler)
handle("GET /v1/package/", s.errorHandler(api.ServePackage))
handle("GET /v1/module/", s.errorHandler(api.ServeModule))
+ handle("GET /v1/versions/", s.errorHandler(api.ServeModuleVersions))
handle("/opensearch.xml", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
serveFileFS(w, r, s.staticFS, "shared/opensearch.xml")
}))