spin up onOrders job on auth

This commit is contained in:
Daniel Lugo 2020-01-13 16:16:02 -04:00
parent ffe28744d9
commit 3cd17357fe

View file

@ -154,6 +154,7 @@ const authenticate = async (alias, pass) => {
}
// move this to a subscription; implement off() ? todo
API.Jobs.onAcceptedRequests(user, mySEA)
API.Jobs.onOrders(user, gun, mySEA)
return user._.sea.pub
}
@ -177,6 +178,7 @@ const authenticate = async (alias, pass) => {
throw new Error(ack.err)
} else if (typeof ack.sea === 'object') {
API.Jobs.onAcceptedRequests(user, mySEA)
API.Jobs.onOrders(user, gun, mySEA)
const mySec = await mySEA.secret(user._.sea.epub, user._.sea)
if (typeof mySec !== 'string') {