Skip to content

Commit 0625d18

Browse files
committed
fix npm Registry link
1 parent 5e2b8cd commit 0625d18

File tree

1 file changed

+2
-1
lines changed
  • routers/api/packages/npm

1 file changed

+2
-1
lines changed

routers/api/packages/npm/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
packages_model "code.gitea.io/gitea/models/packages"
1414
npm_module "code.gitea.io/gitea/modules/packages/npm"
15+
"code.gitea.io/gitea/modules/setting"
1516
)
1617

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

0 commit comments

Comments
 (0)