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:
parent
fd690d5758
commit
0f257cbc0c
6 changed files with 115 additions and 178 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue