Browse Source

#2225

update
tags/v1.22.9.2^2
chenyifan01 3 years ago
parent
commit
77e9692c2e
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      routers/routes/routes.go

+ 10
- 10
routers/routes/routes.go View File

@@ -594,6 +594,16 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/empty", admin.EmptyNotices) m.Post("/empty", admin.EmptyNotices)
}) })


}, adminReq)
// ***** END: Admin *****

operationReq := context.Toggle(&context.ToggleOptions{SignInRequired: true, OperationRequired: true})

// ***** START: Operation *****
m.Group("/operation", func() {
m.Get("/config/recommend_org", operation.Organizations)
m.Post("/config/recommend_org", bindIgnErr(operation.OrgInfos{}), operation.UpdateRecommendOrganizations)

m.Group("/reward/point", func() { m.Group("/reward/point", func() {
m.Get("/limiter/list", point.GetPointLimitConfigList) m.Get("/limiter/list", point.GetPointLimitConfigList)
m.Post("/limiter/add", bindIgnErr(models.LimitConfigVO{}), point.AddPointLimitConfig) m.Post("/limiter/add", bindIgnErr(models.LimitConfigVO{}), point.AddPointLimitConfig)
@@ -606,16 +616,6 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/add", bindIgnErr(models.TaskConfigWithLimit{}), task.AddTaskConfig) m.Post("/add", bindIgnErr(models.TaskConfigWithLimit{}), task.AddTaskConfig)
m.Post("/add/batch", bindIgnErr(models.BatchLimitConfigVO{}), task.BatchAddTaskConfig) m.Post("/add/batch", bindIgnErr(models.BatchLimitConfigVO{}), task.BatchAddTaskConfig)
}) })

}, adminReq)
// ***** END: Admin *****

operationReq := context.Toggle(&context.ToggleOptions{SignInRequired: true, OperationRequired: true})

// ***** START: Operation *****
m.Group("/operation", func() {
m.Get("/config/recommend_org", operation.Organizations)
m.Post("/config/recommend_org", bindIgnErr(operation.OrgInfos{}), operation.UpdateRecommendOrganizations)
}, operationReq) }, operationReq)
// ***** END: Operation ***** // ***** END: Operation *****




Loading…
Cancel
Save