Remove unused code

This commit is contained in:
Daniel Lugo 2021-10-20 11:23:36 -04:00
parent e7756704b4
commit 51bf5904db

View file

@ -143,30 +143,6 @@ const handleMsg = async msg => {
sendMsg(msg) sendMsg(msg)
}) })
} }
if (msg.type === 'load') {
const [root, ...keys] = msg.path.split('>')
/** @type {GunT.GUNNode} */
let node =
{
$root: gun,
$user: user
}[root] || gun.user(root)
for (const key of keys) {
node = node.get(key)
}
node.load((data, key) => {
/** @type {Smith.GunMsgLoad} */
const res = {
data,
id: msg.id,
key,
type: 'load'
}
sendMsg(res)
})
}
if (msg.type === 'on') { if (msg.type === 'on') {
const [root, ...keys] = msg.path.split('>') const [root, ...keys] = msg.path.split('>')