Document creation fixes
This commit is contained in:
parent
071d0800b7
commit
282ef17df3
@ -37,7 +37,7 @@ func newListStorage(spaceId string, db *badger.DB, txn *badger.Txn) (ls storage.
|
||||
|
||||
ls = &listStorage{
|
||||
db: db,
|
||||
keys: aclKeys{},
|
||||
keys: newACLKeys(spaceId),
|
||||
id: stringId,
|
||||
root: rootWithId,
|
||||
}
|
||||
@ -70,7 +70,7 @@ func createListStorage(spaceId string, db *badger.DB, txn *badger.Txn, root *acl
|
||||
|
||||
ls = &listStorage{
|
||||
db: db,
|
||||
keys: aclKeys{},
|
||||
keys: newACLKeys(spaceId),
|
||||
id: root.Id,
|
||||
root: root,
|
||||
}
|
||||
|
||||
@ -125,5 +125,5 @@ func (s *spaceStorage) StoredIds() (ids []string, err error) {
|
||||
}
|
||||
|
||||
func (s *spaceStorage) Close() (err error) {
|
||||
return s.objDb.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/client/badgerprovider"
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app"
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/storage"
|
||||
@ -14,6 +15,7 @@ type storageService struct {
|
||||
|
||||
type ClientStorage interface {
|
||||
storage.SpaceStorageProvider
|
||||
app.ComponentRunnable
|
||||
AllSpaceIds() (ids []string, err error)
|
||||
}
|
||||
|
||||
@ -62,3 +64,11 @@ func (s *storageService) AllSpaceIds() (ids []string, err error) {
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (s *storageService) Run(ctx context.Context) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *storageService) Close(ctx context.Context) (err error) {
|
||||
return s.db.Close()
|
||||
}
|
||||
|
||||
@ -89,6 +89,14 @@ func (s *space) Init(ctx context.Context) (err error) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
aclStorage, err := s.storage.ACLStorage()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
s.aclList, err = list.BuildACLList(aclStorage)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
s.diffService.Init(initialIds)
|
||||
s.syncService.Init()
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user