Skip to content

Commit

Permalink
fix npm Registry link
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Mar 2, 2024
1 parent 5e2b8cd commit 0625d18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routers/api/packages/npm/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

packages_model "code.gitea.io/gitea/models/packages"
npm_module "code.gitea.io/gitea/modules/packages/npm"
"code.gitea.io/gitea/modules/setting"
)

func createPackageMetadataResponse(registryURL string, pds []*packages_model.PackageDescriptor) *npm_module.PackageMetadata {
Expand Down Expand Up @@ -98,7 +99,7 @@ func createPackageSearchResponse(pds []*packages_model.PackageDescriptor, total
Maintainers: []npm_module.User{}, // npm cli needs this field
Keywords: metadata.Keywords,
Links: &npm_module.PackageSearchPackageLinks{
Registry: pd.VersionWebLink(), // TODO: is it right to use VersionWebLink here?
Registry: setting.AppURL + "api/packages/" + pd.Owner.Name + "/npm",
Homepage: metadata.ProjectURL,
},
},
Expand Down

0 comments on commit 0625d18

Please sign in to comment.