mirror of https://github.com/portainer/portainer
Fix missing definitions
parent
ba9838296e
commit
1a387228b0
|
@ -674,6 +674,7 @@ func main() {
|
|||
ResourceControlService: store.ResourceControlService,
|
||||
SettingsService: store.SettingsService,
|
||||
RegistryService: store.RegistryService,
|
||||
DeploymentKeyService: store.DeploymentKeyService,
|
||||
DockerHubService: store.DockerHubService,
|
||||
StackService: store.StackService,
|
||||
ScheduleService: store.ScheduleService,
|
||||
|
|
|
@ -33,7 +33,7 @@ func (handler *Handler) deploymentkeyCreate(w http.ResponseWriter, r *http.Reque
|
|||
return &httperror.HandlerError{http.StatusNotFound, "Unable to find a deployment key with the specified identifier inside the database", err}
|
||||
} else if err != nil {
|
||||
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find a deployment key with the specified identifier inside the database", err}
|
||||
}
|
||||
}
|
||||
|
||||
// Add a function to call and create public key and private key
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/portainer/portainer/api/http/security"
|
||||
)
|
||||
|
||||
// Handler is the HTTP handler used to handle webhook operations.
|
||||
// Handler is the HTTP handler used to handle deploymentkey operations.
|
||||
type Handler struct {
|
||||
*mux.Router
|
||||
DeploymentKeyService portainer.DeploymentKeyService
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/portainer/portainer/api/docker"
|
||||
"github.com/portainer/portainer/api/http/handler"
|
||||
"github.com/portainer/portainer/api/http/handler/auth"
|
||||
"github.com/portainer/portainer/api/http/handler/deploymentkeys"
|
||||
"github.com/portainer/portainer/api/http/handler/dockerhub"
|
||||
"github.com/portainer/portainer/api/http/handler/endpointgroups"
|
||||
"github.com/portainer/portainer/api/http/handler/endpointproxy"
|
||||
|
@ -51,6 +52,7 @@ type Server struct {
|
|||
JobScheduler portainer.JobScheduler
|
||||
Snapshotter portainer.Snapshotter
|
||||
RoleService portainer.RoleService
|
||||
DeploymentKeyService portainer.DeploymentKeyService
|
||||
DockerHubService portainer.DockerHubService
|
||||
EndpointService portainer.EndpointService
|
||||
EndpointGroupService portainer.EndpointGroupService
|
||||
|
@ -222,9 +224,13 @@ func (server *Server) Start() error {
|
|||
webhookHandler.EndpointService = server.EndpointService
|
||||
webhookHandler.DockerClientFactory = server.DockerClientFactory
|
||||
|
||||
var deploymentKeyHandler = deploymentkeys.NewHandler(requestBouncer)
|
||||
deploymentKeyHandler.DeploymentKeyService = server.DeploymentKeyService
|
||||
|
||||
server.Handler = &handler.Handler{
|
||||
RoleHandler: roleHandler,
|
||||
AuthHandler: authHandler,
|
||||
DeploymentKeyHandler: deploymentKeyHandler,
|
||||
DockerHubHandler: dockerHubHandler,
|
||||
EndpointGroupHandler: endpointGroupHandler,
|
||||
EndpointHandler: endpointHandler,
|
||||
|
|
Loading…
Reference in New Issue