diff options
Diffstat (limited to 'routers/api/packages/api.go')
-rw-r--r-- | routers/api/packages/api.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/routers/api/packages/api.go b/routers/api/packages/api.go index e715997e82..4f0f637fa5 100644 --- a/routers/api/packages/api.go +++ b/routers/api/packages/api.go @@ -22,6 +22,7 @@ import ( "code.gitea.io/gitea/routers/api/packages/conan" "code.gitea.io/gitea/routers/api/packages/conda" "code.gitea.io/gitea/routers/api/packages/container" + "code.gitea.io/gitea/routers/api/packages/cran" "code.gitea.io/gitea/routers/api/packages/debian" "code.gitea.io/gitea/routers/api/packages/generic" "code.gitea.io/gitea/routers/api/packages/goproxy" @@ -295,6 +296,24 @@ func CommonRoutes(ctx gocontext.Context) *web.Route { conda.UploadPackageFile(ctx) }) }, reqPackageAccess(perm.AccessModeRead)) + r.Group("/cran", func() { + r.Group("/src", func() { + r.Group("/contrib", func() { + r.Get("/PACKAGES", cran.EnumerateSourcePackages) + r.Get("/PACKAGES{format}", cran.EnumerateSourcePackages) + r.Get("/{filename}", cran.DownloadSourcePackageFile) + }) + r.Put("", reqPackageAccess(perm.AccessModeWrite), cran.UploadSourcePackageFile) + }) + r.Group("/bin", func() { + r.Group("/{platform}/contrib/{rversion}", func() { + r.Get("/PACKAGES", cran.EnumerateBinaryPackages) + r.Get("/PACKAGES{format}", cran.EnumerateBinaryPackages) + r.Get("/{filename}", cran.DownloadBinaryPackageFile) + }) + r.Put("", reqPackageAccess(perm.AccessModeWrite), cran.UploadBinaryPackageFile) + }) + }, reqPackageAccess(perm.AccessModeRead)) r.Group("/debian", func() { r.Get("/repository.key", debian.GetRepositoryKey) r.Group("/dists/{distribution}", func() { |