1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 14:07:02 +09:00

Change object creation to do it through cache

This commit is contained in:
mcrakhman 2023-01-01 22:05:29 +01:00 committed by Mikhail Iudin
parent fd690d5758
commit 0f257cbc0c
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
6 changed files with 115 additions and 178 deletions

View file

@ -33,7 +33,12 @@ func CreateTextDocument(
SpaceId: space.Id(),
Identity: account.Account().Identity,
}
return space.CreateTree(ctx, payload)
obj, err := space.CreateTree(ctx, payload)
if err != nil {
return
}
id = obj.Id()
return
}
func NewTextDocument(ctx context.Context, space commonspace.Space, id string, listener updatelistener.UpdateListener, account accountservice.Service) (doc TextDocument, err error) {