1
0
Fork 0
mirror of synced 2024-09-28 15:21:28 +12:00
This commit is contained in:
Keviin Åberg Kultalahti 2021-05-18 12:21:57 +02:00
parent 7fa0666cae
commit a3f5e1af8c
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 =>
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) {
return []
} else {

View file

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

View file

@ -2,4 +2,4 @@ export { organisation } from "./organisation"
export { users } from "./users"
export { admin } from "./admin"
export { apps } from "./apps"
export { email } from "./email"
export { email } from "./email"

View file

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

View file

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

View file

@ -1,5 +1,9 @@
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")
exports.fetch = async ctx => {