Merge pull request #231 from shocknet/rpc-paths
new path separator for gun rpc
This commit is contained in:
commit
ddfbb2aeed
3 changed files with 4 additions and 4 deletions
|
|
@ -105,7 +105,7 @@ async function deepEncryptIfNeeded(value) {
|
|||
* @returns {Promise<void>}
|
||||
*/
|
||||
const put = async (rawPath, value) => {
|
||||
const [root, ...path] = rawPath.split('.')
|
||||
const [root, ...path] = rawPath.split('>')
|
||||
|
||||
const node = (() => {
|
||||
// eslint-disable-next-line init-declarations
|
||||
|
|
@ -166,7 +166,7 @@ const put = async (rawPath, value) => {
|
|||
*/
|
||||
// eslint-disable-next-line func-style
|
||||
async function set(rawPath, value) {
|
||||
const [root, ...path] = rawPath.split('.')
|
||||
const [root, ...path] = rawPath.split('>')
|
||||
|
||||
const node = (() => {
|
||||
// eslint-disable-next-line init-declarations
|
||||
|
|
|
|||
|
|
@ -3041,7 +3041,7 @@ module.exports = async (
|
|||
publicKey,
|
||||
publicKeyForDecryption
|
||||
}) => {
|
||||
const keys = path.split('.')
|
||||
const keys = path.split('>')
|
||||
const { tryAndWait } = require('../services/gunDB/contact-api/utils')
|
||||
return tryAndWait((gun, user) => {
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ module.exports = (
|
|||
node = getGun().user(root)
|
||||
}
|
||||
|
||||
for (const bit of path.split('.')) {
|
||||
for (const bit of path.split('>')) {
|
||||
node = node.get(bit)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue