juno
juno copied to clipboard
Can I set document owner from node.js code?
Hi @peterpeterparker.
I have an identity that is satellite controller. Let's say principal id is aaa-aaa-aaa
I have a user in juno, their principal is bbb-bbb-bbb
I want to setDoc
on behalve of the user from node.js using controller identity.
When I do
await setDoc({
collection: "receipts",
satellite: {
identity: myControllerIdentity,
},
key: nanoid(),
owner: "bbb-bbb-bbb",
doc: {
date: '2024-04-04',
...
}
})
I expect resulting doc to be owned by the user (bbb-bbb-bbb
), but it still belongs to the controller principal(aaa-aaa-aaa
).
Do I miss something? Is this possible with rust juno client? Is it possible at all?