This commit is contained in:
mike12345567 2021-07-23 20:03:11 +01:00
parent 4d0faa38e3
commit c63ee57bbd
2 changed files with 5 additions and 5 deletions

View File

@ -43,8 +43,7 @@ const DocumentTypes = {
exports.DocumentTypes = DocumentTypes
exports.APP_PREFIX = DocumentTypes.APP + SEPARATOR
exports.APP_DEV =
exports.APP_DEV_PREFIX = DocumentTypes.APP_DEV + SEPARATOR
exports.APP_DEV = exports.APP_DEV_PREFIX = DocumentTypes.APP_DEV + SEPARATOR
exports.SEPARATOR = SEPARATOR
function isDevApp(app) {
@ -223,8 +222,10 @@ exports.getAllApps = async ({ tenantId, dev, all } = {}) => {
const noTenantId = split.length === 2 || split[1] === DocumentTypes.DEV
// tenantId is always right before the UUID
const possibleTenantId = split[split.length - 2]
return (tenantId === DEFAULT_TENANT_ID && noTenantId) ||
(possibleTenantId === tenantId)
return (
(tenantId === DEFAULT_TENANT_ID && noTenantId) ||
possibleTenantId === tenantId
)
}
return false
})

View File

@ -18,7 +18,6 @@ const env = require("../../../environment")
const PLATFORM_INFO_DB = StaticDatabases.PLATFORM_INFO.name
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants
async function tryAddTenant(tenantId, userId, email) {
const db = new CouchDB(PLATFORM_INFO_DB)
const getDoc = async id => {