move Connection interface to api/database, and edgejob type definitions to api/dataservices/edgejobs to reduce the number of deps on portainer., and make deps on specific structures more obvious
Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io>
This commit is contained in:
@@ -3,6 +3,7 @@ package webhooks
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/portainer/portainer/api/database"
|
||||
"github.com/portainer/portainer/api/internal/registryutils"
|
||||
"io"
|
||||
"net/http"
|
||||
@@ -45,7 +46,7 @@ func (handler *Handler) webhookExecute(w http.ResponseWriter, r *http.Request) *
|
||||
registryID := webhook.RegistryID
|
||||
webhookType := webhook.WebhookType
|
||||
|
||||
endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID))
|
||||
endpoint, err := handler.DataStore.Endpoint().Endpoint(database.EndpointID(endpointID))
|
||||
if handler.DataStore.IsErrObjectNotFound(err) {
|
||||
return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err}
|
||||
} else if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user