Refactor maven package registry (#33049)

Close #33036
This commit is contained in:
wxiaoguang 2024-12-31 13:30:52 +08:00 committed by GitHub
parent 54bd220520
commit e5c576e92b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 143 additions and 60 deletions

View file

@ -430,8 +430,6 @@ func CommonRoutes() *web.Router {
r.Post("/api/charts", reqPackageAccess(perm.AccessModeWrite), helm.UploadPackage)
}, reqPackageAccess(perm.AccessModeRead))
r.Group("/maven", func() {
// FIXME: this path design is not right.
// It should be `/.../{groupId}/{artifactId}/{version}`, but not `/.../{groupId}-{artifactId}/{version}`
r.Put("/*", reqPackageAccess(perm.AccessModeWrite), maven.UploadPackageFile)
r.Get("/*", maven.DownloadPackageFile)
r.Head("/*", maven.ProvidePackageFileHeader)