mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(api): use a standard stack identifier (#1980)
This commit is contained in:
parent
da5a430b8c
commit
b4c2820ad7
14 changed files with 150 additions and 38 deletions
|
@ -31,6 +31,7 @@ type Store struct {
|
|||
|
||||
db *bolt.DB
|
||||
checkForDataMigration bool
|
||||
FileService portainer.FileService
|
||||
}
|
||||
|
||||
const (
|
||||
|
@ -50,7 +51,7 @@ const (
|
|||
)
|
||||
|
||||
// NewStore initializes a new Store and the associated services
|
||||
func NewStore(storePath string) (*Store, error) {
|
||||
func NewStore(storePath string, fileService portainer.FileService) (*Store, error) {
|
||||
store := &Store{
|
||||
Path: storePath,
|
||||
UserService: &UserService{},
|
||||
|
@ -65,6 +66,7 @@ func NewStore(storePath string) (*Store, error) {
|
|||
DockerHubService: &DockerHubService{},
|
||||
StackService: &StackService{},
|
||||
TagService: &TagService{},
|
||||
FileService: fileService,
|
||||
}
|
||||
store.UserService.store = store
|
||||
store.TeamService.store = store
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue