mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 12:21:03 +00:00
16 lines
264 B
Go
16 lines
264 B
Go
|
package server
|
||
|
|
||
|
import (
|
||
|
"github.com/drone/drone/store"
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
func GetAgents(c *gin.Context) {
|
||
|
agents, err := store.GetAgentList(c)
|
||
|
if err != nil {
|
||
|
c.String(500, "Error getting agent list. %s", err)
|
||
|
return
|
||
|
}
|
||
|
c.JSON(200, agents)
|
||
|
}
|