mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Add Cargo package registry (#21888)
This PR implements a [Cargo registry](https://doc.rust-lang.org/cargo/) to manage Rust packages. This package type was a little bit more complicated because Cargo needs an additional Git repository to store its package index. Screenshots:    --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@ -468,6 +468,10 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Get("/preview", user_setting.PackagesRulePreview)
|
||||
})
|
||||
})
|
||||
m.Group("/cargo", func() {
|
||||
m.Post("/initialize", user_setting.InitializeCargoIndex)
|
||||
m.Post("/rebuild", user_setting.RebuildCargoIndex)
|
||||
})
|
||||
}, packagesEnabled)
|
||||
m.Group("/secrets", func() {
|
||||
m.Get("", user_setting.Secrets)
|
||||
@ -818,6 +822,10 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Get("/preview", org.PackagesRulePreview)
|
||||
})
|
||||
})
|
||||
m.Group("/cargo", func() {
|
||||
m.Post("/initialize", org.InitializeCargoIndex)
|
||||
m.Post("/rebuild", org.RebuildCargoIndex)
|
||||
})
|
||||
}, packagesEnabled)
|
||||
}, func(ctx *context.Context) {
|
||||
ctx.Data["EnableOAuth2"] = setting.OAuth2.Enable
|
||||
|
Reference in New Issue
Block a user