From 9e3b78546adc014e39674067c3825f241ffa5a93 Mon Sep 17 00:00:00 2001 From: emad-salah Date: Thu, 4 Nov 2021 13:32:40 +0100 Subject: [PATCH] Remove `user.leave()` --- services/gunDB/Mediator/index.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/services/gunDB/Mediator/index.js b/services/gunDB/Mediator/index.js index ced3416c..1cfd24d2 100644 --- a/services/gunDB/Mediator/index.js +++ b/services/gunDB/Mediator/index.js @@ -392,15 +392,11 @@ const authenticate = async (alias, pass, __user) => { } } -const logoff = () => { - user.leave() -} - const instantiateGun = () => { const Config = require('../config') - if (user) { - user.leave() - } + // if (user) { + // user.leave() + // } // @ts-ignore user = null if (gun) { @@ -523,7 +519,7 @@ const register = async (alias, pass) => { module.exports = { authenticate, - logoff, + instantiateGun, isAuthenticated, isAuthenticating, isRegistering,