Merge branch 'master' of github.com:Budibase/budibase into fix/roles-issue
This commit is contained in:
commit
2ab8d3ff22
|
@ -30,9 +30,9 @@ exports.save = async function (ctx) {
|
||||||
datasource._rev = response.rev
|
datasource._rev = response.rev
|
||||||
|
|
||||||
// Drain connection pools when configuration is changed
|
// Drain connection pools when configuration is changed
|
||||||
const pool = integrations[datasource.source].pool
|
const source = integrations[datasource.source]
|
||||||
if (pool) {
|
if (source && source.pool) {
|
||||||
await pool.end()
|
await source.pool.end()
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.status = 200
|
ctx.status = 200
|
||||||
|
|
|
@ -5,7 +5,7 @@ jest.mock("../../environment", () => ({
|
||||||
prod: false,
|
prod: false,
|
||||||
isTest: () => true,
|
isTest: () => true,
|
||||||
isProd: () => this.prod,
|
isProd: () => this.prod,
|
||||||
_set: (key, value) => {
|
_set: function(key, value) {
|
||||||
this.prod = value === "production"
|
this.prod = value === "production"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -91,7 +91,7 @@ describe("resourceId middleware", () => {
|
||||||
.mainResource("custom")
|
.mainResource("custom")
|
||||||
.subResource("customSub")
|
.subResource("customSub")
|
||||||
.build()
|
.build()
|
||||||
config = new TestConfiguration(middleware)
|
let config = new TestConfiguration(middleware)
|
||||||
config.setBody({
|
config.setBody({
|
||||||
custom: "test",
|
custom: "test",
|
||||||
customSub: "subtest"
|
customSub: "subtest"
|
||||||
|
|
Loading…
Reference in New Issue