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
9 changed files with 305 additions and 88 deletions
+6
View File
@@ -32,6 +32,12 @@ func NewService(connection portainer.Connection) (*Service, error) {
}, nil
}
func (service *Service) Tx(tx portainer.Transaction) ServiceTx {
return ServiceTx{
BaseDataServiceTx: service.BaseDataService.Tx(tx),
}
}
// StackByName returns a stack object by name.
func (service *Service) StackByName(name string) (*portainer.Stack, error) {
var s portainer.Stack