aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorZettat123 <zettat123@gmail.com>2023-03-18 02:39:19 +0800
committerGitHub <noreply@github.com>2023-03-17 14:39:19 -0400
commit46addc1f938abefd346a7a74d815f6c4faaa6818 (patch)
tree8a6aa96bcf117e92a2433c1b5cd7e87909ee0dfb /routers
parentd0f48187f92aea6dec0804c1a43731c1a77fd491 (diff)
downloadgitea-46addc1f938abefd346a7a74d815f6c4faaa6818.tar.gz
gitea-46addc1f938abefd346a7a74d815f6c4faaa6818.zip
Return `repository` in npm package metadata endpoint (#23539)
Close #23444 Add `Repository` to npm package `Metadata` struct so the `repository` in `package.json` can be stored and be returned in the endpoint. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'routers')
-rw-r--r--routers/api/packages/npm/api.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/packages/npm/api.go b/routers/api/packages/npm/api.go
index f8d50f03cf..8470874884 100644
--- a/routers/api/packages/npm/api.go
+++ b/routers/api/packages/npm/api.go
@@ -45,6 +45,7 @@ func createPackageMetadataResponse(registryURL string, pds []*packages_model.Pac
Author: npm_module.User{Name: metadata.Author},
License: metadata.License,
Versions: versions,
+ Repository: metadata.Repository,
}
}