mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-11 18:15:28 +00:00
Grouping queue endpoints
This commit is contained in:
parent
e5111f3ebe
commit
567e6b8a18
1 changed files with 2 additions and 6 deletions
|
@ -140,16 +140,12 @@ func Load(mux *httptreemux.ContextMux, middleware ...gin.HandlerFunc) http.Handl
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
info := e.Group("/api/info")
|
queue := e.Group("/api/queue")
|
||||||
{
|
{
|
||||||
info.GET("/queue",
|
queue.GET("/info",
|
||||||
session.MustAdmin(),
|
session.MustAdmin(),
|
||||||
server.GetQueueInfo,
|
server.GetQueueInfo,
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
queue := e.Group("/api/queue")
|
|
||||||
{
|
|
||||||
queue.GET("/pause",
|
queue.GET("/pause",
|
||||||
session.MustAdmin(),
|
session.MustAdmin(),
|
||||||
server.PauseQueue,
|
server.PauseQueue,
|
||||||
|
|
Loading…
Reference in a new issue