This commit is contained in:
Keviin Åberg Kultalahti 2021-05-18 12:21:57 +02:00
parent 7c3e7ab7aa
commit 9f5e891b72
6 changed files with 10 additions and 9 deletions

View File

@ -166,7 +166,9 @@ exports.getAllApps = async (devApps = false) => {
const appDbNames = allDbs.filter(dbName => const appDbNames = allDbs.filter(dbName =>
dbName.startsWith(exports.APP_PREFIX) dbName.startsWith(exports.APP_PREFIX)
) )
const appPromises = appDbNames.map(db => new CouchDB(db).get(DocumentTypes.APP_METADATA)) const appPromises = appDbNames.map(db =>
new CouchDB(db).get(DocumentTypes.APP_METADATA)
)
if (appPromises.length === 0) { if (appPromises.length === 0) {
return [] return []
} else { } else {

View File

@ -143,7 +143,6 @@ class RedisWrapper {
} }
async clear() { async clear() {
const db = this._db
let items = await this.scan() let items = await this.scan()
await Promise.all(items.map(obj => this.delete(obj.key))) await Promise.all(items.map(obj => this.delete(obj.key)))
} }

View File

@ -1,15 +1,12 @@
const CouchDB = require("../../db") const CouchDB = require("../../db")
const { const {
getBuiltinRoles,
Role, Role,
getRole, getRole,
isBuiltin, isBuiltin,
getExternalRoleID,
getAllRoles, getAllRoles,
} = require("@budibase/auth/roles") } = require("@budibase/auth/roles")
const { const {
generateRoleID, generateRoleID,
getRoleParams,
getUserMetadataParams, getUserMetadataParams,
InternalTables, InternalTables,
} = require("../../db/utils") } = require("../../db/utils")

View File

@ -1,5 +1,4 @@
const { SearchIndexes } = require("../../../db/utils") const { SearchIndexes } = require("../../../db/utils")
const { checkSlashesInUrl } = require("../../../utilities")
const env = require("../../../environment") const env = require("../../../environment")
const fetch = require("node-fetch") const fetch = require("node-fetch")
@ -10,7 +9,7 @@ const fetch = require("node-fetch")
* @returns {string} * @returns {string}
*/ */
const luceneEscape = value => { const luceneEscape = value => {
return `${value}`.replace(/[ #+\-&|!(){}\[\]^"~*?:\\]/g, "\\$&") return `${value}`.replace(/[ #+\-&|!(){}\]^"~*?:\\]/g, "\\$&")
} }
/** /**

View File

@ -1,5 +1,9 @@
const { getAllRoles } = require("@budibase/auth/roles") const { getAllRoles } = require("@budibase/auth/roles")
const { getAllApps, getDeployedAppID, DocumentTypes } = require("@budibase/auth/db") const {
getAllApps,
getDeployedAppID,
DocumentTypes,
} = require("@budibase/auth/db")
const CouchDB = require("../../../db") const CouchDB = require("../../../db")
exports.fetch = async ctx => { exports.fetch = async ctx => {