From a6ab80ac1eb7a1395c9d627cbf3ab487cb714add Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Fri, 14 Feb 2020 16:22:58 -0400 Subject: [PATCH] spin up jobs after setup --- services/gunDB/Mediator/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/gunDB/Mediator/index.js b/services/gunDB/Mediator/index.js index ea0e373f..3a063988 100644 --- a/services/gunDB/Mediator/index.js +++ b/services/gunDB/Mediator/index.js @@ -198,9 +198,6 @@ const authenticate = async (alias, pass) => { if (typeof ack.err === 'string') { throw new Error(ack.err) } else if (typeof ack.sea === 'object') { - API.Jobs.onAcceptedRequests(user, mySEA) - API.Jobs.onOrders(user, gun, mySEA) - mySec = await mySEA.secret(user._.sea.epub, user._.sea) _currentAlias = user.is ? user.is.alias : '' @@ -208,6 +205,9 @@ const authenticate = async (alias, pass) => { await new Promise(res => setTimeout(res, 5000)) + API.Jobs.onAcceptedRequests(user, mySEA) + API.Jobs.onOrders(user, gun, mySEA) + return ack.sea.pub } else { throw new Error('Unknown error.')