mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-18 16:41:27 +00:00
Implement org/user agents (#3539)
This commit is contained in:
@@ -71,6 +71,11 @@ func apiRoutes(e *gin.RouterGroup) {
|
||||
org.GET("/registries/:registry", api.GetOrgRegistry)
|
||||
org.PATCH("/registries/:registry", api.PatchOrgRegistry)
|
||||
org.DELETE("/registries/:registry", api.DeleteOrgRegistry)
|
||||
|
||||
org.GET("/agents", api.GetOrgAgents)
|
||||
org.POST("/agents", api.PostOrgAgent)
|
||||
org.PATCH("/agents/:agent_id", api.PatchOrgAgent)
|
||||
org.DELETE("/agents/:agent_id", api.DeleteOrgAgent)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -217,10 +222,10 @@ func apiRoutes(e *gin.RouterGroup) {
|
||||
agentBase.Use(session.MustAdmin())
|
||||
agentBase.GET("", api.GetAgents)
|
||||
agentBase.POST("", api.PostAgent)
|
||||
agentBase.GET("/:agent", api.GetAgent)
|
||||
agentBase.GET("/:agent/tasks", api.GetAgentTasks)
|
||||
agentBase.PATCH("/:agent", api.PatchAgent)
|
||||
agentBase.DELETE("/:agent", api.DeleteAgent)
|
||||
agentBase.GET("/:agent_id", api.GetAgent)
|
||||
agentBase.GET("/:agent_id/tasks", api.GetAgentTasks)
|
||||
agentBase.PATCH("/:agent_id", api.PatchAgent)
|
||||
agentBase.DELETE("/:agent_id", api.DeleteAgent)
|
||||
}
|
||||
|
||||
apiBase.GET("/forges", api.GetForges)
|
||||
|
Reference in New Issue
Block a user