mirror of https://github.com/portainer/portainer
18 lines
483 B
Go
18 lines
483 B
Go
package edgestacks
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
httperror "github.com/portainer/libhttp/error"
|
|
"github.com/portainer/libhttp/response"
|
|
)
|
|
|
|
func (handler *Handler) edgeStackList(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
|
edgeStacks, err := handler.DataStore.EdgeStack().EdgeStacks()
|
|
if err != nil {
|
|
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve edge stacks from the database", err}
|
|
}
|
|
|
|
return response.JSON(w, edgeStacks)
|
|
}
|