*Replace dht references with swarm
This commit is contained in:
parent
d608392532
commit
4e443f4ccb
12
src/index.ts
12
src/index.ts
|
@ -203,9 +203,9 @@ async function handleAddRelay(aq: ActiveQuery) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dht = await getSwarm(aq);
|
const swarm = await getSwarm(aq);
|
||||||
|
|
||||||
aq.respond(await dht.addRelay(pubkey));
|
aq.respond(await swarm.addRelay(pubkey));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleRemoveRelay(aq: ActiveQuery) {
|
async function handleRemoveRelay(aq: ActiveQuery) {
|
||||||
|
@ -216,15 +216,15 @@ async function handleRemoveRelay(aq: ActiveQuery) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dht = await getSwarm(aq);
|
const swarm = await getSwarm(aq);
|
||||||
|
|
||||||
aq.respond(dht.removeRelay(pubkey));
|
aq.respond(swarm.removeRelay(pubkey));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleClearRelays(aq: ActiveQuery) {
|
async function handleClearRelays(aq: ActiveQuery) {
|
||||||
const dht = await getSwarm(aq);
|
const swarm = await getSwarm(aq);
|
||||||
|
|
||||||
dht.clearRelays();
|
swarm.clearRelays();
|
||||||
|
|
||||||
aq.respond();
|
aq.respond();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue