Browse Source

#2624

add resource page route
tags/v1.22.8.2^2
chenyifan01 3 years ago
parent
commit
40c015de6b
2 changed files with 30 additions and 0 deletions
  1. +24
    -0
      routers/admin/resources.go
  2. +6
    -0
      routers/routes/routes.go

+ 24
- 0
routers/admin/resources.go View File

@@ -0,0 +1,24 @@
package admin

import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
)

const (
tplResourceQueue base.TplName = "admin/resource/queue"
tplResourceSpecification base.TplName = "admin/resource/specification"
tplResourceScene base.TplName = "admin/resource/scene"
)

func GetQueuePage(ctx *context.Context) {
ctx.HTML(200, tplResourceQueue)
}

func GetSpecificationPage(ctx *context.Context) {
ctx.HTML(200, tplResourceSpecification)
}

func GetScenePage(ctx *context.Context) {
ctx.HTML(200, tplResourceScene)
}

+ 6
- 0
routers/routes/routes.go View File

@@ -605,6 +605,12 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/delete", admin.DeleteNotices)
m.Post("/empty", admin.EmptyNotices)
})

m.Group("/resources", func() {
m.Get("/queue", admin.GetQueuePage)
m.Get("/specification", admin.GetSpecificationPage)
m.Get("/scene", admin.GetScenePage)
})
}, adminReq)
// ***** END: Admin *****



Loading…
Cancel
Save