mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(transactions): remove the feature flag EE-6080 (#10257)
This commit is contained in:
parent
e83aa4d88d
commit
c748385879
28 changed files with 123 additions and 384 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"github.com/portainer/portainer/api/dataservices"
|
||||
"github.com/portainer/portainer/api/filesystem"
|
||||
"github.com/portainer/portainer/api/internal/edge"
|
||||
"github.com/portainer/portainer/pkg/featureflags"
|
||||
"github.com/portainer/portainer/pkg/libhelm"
|
||||
httperror "github.com/portainer/portainer/pkg/libhttp/error"
|
||||
"github.com/portainer/portainer/pkg/libhttp/request"
|
||||
|
@ -120,15 +119,10 @@ func (handler *Handler) settingsUpdate(w http.ResponseWriter, r *http.Request) *
|
|||
}
|
||||
|
||||
var settings *portainer.Settings
|
||||
if featureflags.IsEnabled(portainer.FeatureNoTx) {
|
||||
settings, err = handler.updateSettings(handler.DataStore, payload)
|
||||
} else {
|
||||
err = handler.DataStore.UpdateTx(func(tx dataservices.DataStoreTx) error {
|
||||
settings, err = handler.updateSettings(tx, payload)
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
err = handler.DataStore.UpdateTx(func(tx dataservices.DataStoreTx) error {
|
||||
settings, err = handler.updateSettings(tx, payload)
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
var httpErr *httperror.HandlerError
|
||||
if errors.As(err, &httpErr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue