1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

feat(transactions): migrate some parts to use transactional code EE-5494 (#9213)

This commit is contained in:
andres-portainer 2023-07-17 17:36:00 -03:00 committed by GitHub
parent fbec123595
commit 8c533bee67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 305 additions and 88 deletions

View file

@ -73,7 +73,6 @@ func (handler *Handler) stackCreate(w http.ResponseWriter, r *http.Request) *htt
}
func (handler *Handler) createComposeStack(w http.ResponseWriter, r *http.Request, method string, endpoint *portainer.Endpoint, userID portainer.UserID) *httperror.HandlerError {
switch method {
case "string":
return handler.createComposeStackFromFileContent(w, r, endpoint, userID)
@ -108,6 +107,7 @@ func (handler *Handler) createKubernetesStack(w http.ResponseWriter, r *http.Req
case "url":
return handler.createKubernetesStackFromManifestURL(w, r, endpoint, userID)
}
return httperror.BadRequest("Invalid value for query parameter: method. Value must be one of: string or repository", errors.New(request.ErrInvalidQueryParameter))
}