renamed singleDatabase => singleDbConnection

This commit is contained in:
Jan Prochazka
2022-12-25 18:01:36 +01:00
parent 54278f6276
commit bbb6c5e5f5
7 changed files with 14 additions and 11 deletions

View File

@@ -38,7 +38,7 @@ module.exports = {
return {
runAsPortal: !!connections.portalConnections,
singleDatabase: connections.singleDatabase,
singleDbConnection: connections.singleDbConnection,
singleConnection: connections.singleConnection,
// hideAppEditor: !!process.env.HIDE_APP_EDITOR,
allowShellConnection: platformInfo.allowShellConnection,

View File

@@ -133,7 +133,7 @@ function getPortalCollections() {
const portalConnections = getPortalCollections();
function getSingleDatabase() {
function getSingleDbConnection() {
if (process.env.SINGLE_CONNECTION && process.env.SINGLE_DATABASE) {
// @ts-ignore
const connection = portalConnections.find(x => x._id == process.env.SINGLE_CONNECTION);
@@ -158,7 +158,7 @@ function getSingleDatabase() {
}
function getSingleConnection() {
if (getSingleDatabase()) return null;
if (getSingleDbConnection()) return null;
if (process.env.SINGLE_CONNECTION) {
// @ts-ignore
const connection = portalConnections.find(x => x._id == process.env.SINGLE_CONNECTION);
@@ -174,13 +174,13 @@ function getSingleConnection() {
return null;
}
const singleDatabase = getSingleDatabase();
const singleDbConnection = getSingleDbConnection();
const singleConnection = getSingleConnection();
module.exports = {
datastore: null,
opened: [],
singleDatabase,
singleDbConnection,
singleConnection,
portalConnections,