Wait for auth only when putting to user graph
This commit is contained in:
parent
38e374c329
commit
a41862c7b0
1 changed files with 4 additions and 1 deletions
|
|
@ -211,8 +211,11 @@ const handleMsg = async msg => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (msg.type === 'put') {
|
if (msg.type === 'put') {
|
||||||
await waitForAuth()
|
|
||||||
const [root, ...keys] = msg.path.split('>')
|
const [root, ...keys] = msg.path.split('>')
|
||||||
|
if (root === '$user') {
|
||||||
|
await waitForAuth()
|
||||||
|
logger.info('waited for auth ok')
|
||||||
|
}
|
||||||
|
|
||||||
/** @type {GunT.GUNNode} */
|
/** @type {GunT.GUNNode} */
|
||||||
let node =
|
let node =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue