A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pass the version to the credentials helper handler

Signed-off-by: Will Andrews <did:plc:dadhhalkfcq3gucaq25hjqon>

+5 -3
+2 -1
pkg/appview/handlers/api.go
··· 176 176 // Note: Version info is fetched dynamically from TangledRepo's releases 177 177 type CredentialHelperVersionHandler struct { 178 178 TangledRepo string 179 + Version string 179 180 } 180 181 181 182 func (h *CredentialHelperVersionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 182 183 // This endpoint directs users to the Tangled repository for downloads 183 184 // Version info should be fetched from the repository's releases page 184 185 response := CredentialHelperVersionResponse{ 185 - Latest: "", 186 + Latest: h.Version, 186 187 DownloadURLs: map[string]string{"tangled_repo": h.TangledRepo}, 187 188 Checksums: nil, 188 189 ReleaseNotes: "Visit the Tangled repository for the latest releases: " + h.TangledRepo,
+2 -1
pkg/appview/routes/routes.go
··· 272 272 // RegisterCredentialHelperEndpoint registers the credential helper version API 273 273 // endpoint (GET /api/credential-helper/version). Separated from RegisterUIRoutes 274 274 // for the same import-cycle reason as RegisterDeviceEndpoints. 275 - func RegisterCredentialHelperEndpoint(router chi.Router, tangledRepo string) { 275 + func RegisterCredentialHelperEndpoint(router chi.Router, tangledRepo, version string) { 276 276 router.Handle("/api/credential-helper/version", &uihandlers.CredentialHelperVersionHandler{ 277 277 TangledRepo: tangledRepo, 278 + Version: version, 278 279 }) 279 280 } 280 281
+1 -1
pkg/appview/server.go
··· 612 612 mainRouter.Get("/.well-known/did.json", s.handleDIDDocument) 613 613 614 614 // Register credential helper version API (public endpoint) 615 - routes.RegisterCredentialHelperEndpoint(mainRouter, cfg.CredentialHelper.TangledRepo) 615 + routes.RegisterCredentialHelperEndpoint(mainRouter, cfg.CredentialHelper.TangledRepo, cfg.Version) 616 616 617 617 s.Router = mainRouter 618 618