Refactoring backend-core tenancy to context, splitting out tenancy functionality to its own area.
This commit is contained in:
parent
dbc048b365
commit
72534c6ed2
|
@ -5,7 +5,7 @@ const {
|
||||||
getAppId,
|
getAppId,
|
||||||
updateAppId,
|
updateAppId,
|
||||||
doInAppContext,
|
doInAppContext,
|
||||||
} = require("./src/tenancy/context")
|
} = require("./src/context")
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getAppDB,
|
getAppDB,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
module.exports = require("./src/tenancy/deprovision")
|
module.exports = require("./src/context/deprovision")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { getGlobalUserParams, getAllApps } = require("../db/utils")
|
const { getGlobalUserParams, getAllApps } = require("../db/utils")
|
||||||
const { getDB, getCouch } = require("../db")
|
const { getDB, getCouch } = require("../db")
|
||||||
const { getGlobalDB } = require("./tenancy")
|
const { getGlobalDB } = require("../tenancy")
|
||||||
const { StaticDatabases } = require("../db/constants")
|
const { StaticDatabases } = require("../db/constants")
|
||||||
|
|
||||||
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants
|
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants
|
|
@ -5,7 +5,7 @@ const {
|
||||||
DEFAULT_TENANT_ID,
|
DEFAULT_TENANT_ID,
|
||||||
updateAppId,
|
updateAppId,
|
||||||
} = require("../tenancy")
|
} = require("../tenancy")
|
||||||
const ContextFactory = require("../tenancy/FunctionContext")
|
const ContextFactory = require("../context/FunctionContext")
|
||||||
const { getTenantIDFromAppID } = require("../db/utils")
|
const { getTenantIDFromAppID } = require("../db/utils")
|
||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const { setTenantId } = require("../tenancy")
|
const { setTenantId } = require("../tenancy")
|
||||||
const ContextFactory = require("../tenancy/FunctionContext")
|
const ContextFactory = require("../context/FunctionContext")
|
||||||
const { buildMatcherRegex, matches } = require("./matchers")
|
const { buildMatcherRegex, matches } = require("./matchers")
|
||||||
|
|
||||||
module.exports = (
|
module.exports = (
|
||||||
|
|
|
@ -6,7 +6,7 @@ const {
|
||||||
DocumentTypes,
|
DocumentTypes,
|
||||||
SEPARATOR,
|
SEPARATOR,
|
||||||
} = require("../db/utils")
|
} = require("../db/utils")
|
||||||
const { getAppDB } = require("../tenancy/context")
|
const { getAppDB } = require("../context")
|
||||||
const { getDB } = require("../db")
|
const { getDB } = require("../db")
|
||||||
|
|
||||||
const BUILTIN_IDS = {
|
const BUILTIN_IDS = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...require("./context"),
|
...require("../context"),
|
||||||
...require("./tenancy"),
|
...require("./tenancy"),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { getDB } = require("../db")
|
const { getDB } = require("../db")
|
||||||
const { SEPARATOR, StaticDatabases, DocumentTypes } = require("../db/constants")
|
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 env = require("../environment")
|
||||||
|
|
||||||
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants
|
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants
|
||||||
|
|
Loading…
Reference in New Issue