mirror of https://github.com/portainer/portainer
feat(api): initializes the endpoint with an empty slice instead of a pointer
parent
8cf6d34362
commit
980f65a08a
|
@ -44,7 +44,7 @@ func (service *EndpointService) Endpoint(ID portainer.EndpointID) (*portainer.En
|
||||||
|
|
||||||
// Endpoints return an array containing all the endpoints.
|
// Endpoints return an array containing all the endpoints.
|
||||||
func (service *EndpointService) Endpoints() ([]portainer.Endpoint, error) {
|
func (service *EndpointService) Endpoints() ([]portainer.Endpoint, error) {
|
||||||
var endpoints []portainer.Endpoint
|
var endpoints = make([]portainer.Endpoint, 0)
|
||||||
err := service.store.db.View(func(tx *bolt.Tx) error {
|
err := service.store.db.View(func(tx *bolt.Tx) error {
|
||||||
bucket := tx.Bucket([]byte(endpointBucketName))
|
bucket := tx.Bucket([]byte(endpointBucketName))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue