aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index b7128fc3a9..a024c0ac37 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -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