Refactoring backend-core tenancy to context, splitting out tenancy functionality to its own area.

This commit is contained in:
mike12345567 2022-01-31 17:53:19 +00:00
parent dbc048b365
commit 72534c6ed2
10 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ const {
getAppId,
updateAppId,
doInAppContext,
} = require("./src/tenancy/context")
} = require("./src/context")
module.exports = {
getAppDB,

View File

@ -1 +1 @@
module.exports = require("./src/tenancy/deprovision")
module.exports = require("./src/context/deprovision")

View File

@ -1,6 +1,6 @@
const { getGlobalUserParams, getAllApps } = require("../db/utils")
const { getDB, getCouch } = require("../db")
const { getGlobalDB } = require("./tenancy")
const { getGlobalDB } = require("../tenancy")
const { StaticDatabases } = require("../db/constants")
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants

View File

@ -5,7 +5,7 @@ const {
DEFAULT_TENANT_ID,
updateAppId,
} = require("../tenancy")
const ContextFactory = require("../tenancy/FunctionContext")
const ContextFactory = require("../context/FunctionContext")
const { getTenantIDFromAppID } = require("../db/utils")
module.exports = () => {

View File

@ -1,5 +1,5 @@
const { setTenantId } = require("../tenancy")
const ContextFactory = require("../tenancy/FunctionContext")
const ContextFactory = require("../context/FunctionContext")
const { buildMatcherRegex, matches } = require("./matchers")
module.exports = (

View File

@ -6,7 +6,7 @@ const {
DocumentTypes,
SEPARATOR,
} = require("../db/utils")
const { getAppDB } = require("../tenancy/context")
const { getAppDB } = require("../context")
const { getDB } = require("../db")
const BUILTIN_IDS = {

View File

@ -1,4 +1,4 @@
module.exports = {
...require("./context"),
...require("../context"),
...require("./tenancy"),
}

View File

@ -1,6 +1,6 @@
const { getDB } = require("../db")
const { SEPARATOR, StaticDatabases, DocumentTypes } = require("../db/constants")
const { getTenantId, DEFAULT_TENANT_ID, isMultiTenant } = require("./context")
const { getTenantId, DEFAULT_TENANT_ID, isMultiTenant } = require("../context")
const env = require("../environment")
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants