Fixing an issue with automations throwing a Pouch error due to the auth library database not being setup.
This commit is contained in:
parent
a0bb13e5c0
commit
d1127f3220
|
@ -1,6 +1,5 @@
|
|||
// when thread starts, make sure it is recorded
|
||||
require("./utils").threadSetup()
|
||||
const env = require("../environment")
|
||||
env.setInThread()
|
||||
const actions = require("../automations/actions")
|
||||
const automationUtils = require("../automations/automationUtils")
|
||||
const AutomationEmitter = require("../events/AutomationEmitter")
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
// when thread starts, make sure it is recorded
|
||||
const env = require("../environment")
|
||||
env.setInThread()
|
||||
require("./utils").threadSetup()
|
||||
const ScriptRunner = require("../utilities/scriptRunner")
|
||||
const { integrations } = require("../integrations")
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
const env = require("../environment")
|
||||
const CouchDB = require("../db")
|
||||
const { init } = require("@budibase/auth")
|
||||
|
||||
exports.threadSetup = () => {
|
||||
// when thread starts, make sure it is recorded
|
||||
env.setInThread()
|
||||
init(CouchDB)
|
||||
}
|
Loading…
Reference in New Issue