mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 03:16:01 +00:00
SYNC: fixed BE for premium
This commit is contained in:
committed by
Diflow
parent
b99c38a070
commit
098ebb38dc
@@ -13,7 +13,7 @@ const {
|
||||
convertToMongoSort,
|
||||
} = require('../frontend/convertToMongoCondition');
|
||||
|
||||
let platformInfo;
|
||||
let isProApp;
|
||||
|
||||
function serializeMongoData(row) {
|
||||
return EJSON.serialize(
|
||||
@@ -130,7 +130,7 @@ const driver = {
|
||||
};
|
||||
},
|
||||
async script(dbhan, sql) {
|
||||
if (platformInfo.isProApp) {
|
||||
if (isProApp) {
|
||||
const { NodeDriverServiceProvider } = require('@mongosh/service-provider-node-driver');
|
||||
const { ElectronRuntime } = require('@mongosh/browser-runtime-electron');
|
||||
|
||||
@@ -185,7 +185,7 @@ const driver = {
|
||||
// saveScriptToDatabase({ conid: connection._id, database: name }, `db.createCollection('${newCollection}')`);
|
||||
},
|
||||
async stream(dbhan, sql, options) {
|
||||
if (platformInfo.isProApp) {
|
||||
if (isProApp) {
|
||||
const { NodeDriverServiceProvider } = require('@mongosh/service-provider-node-driver');
|
||||
const { ElectronRuntime } = require('@mongosh/browser-runtime-electron');
|
||||
|
||||
@@ -692,7 +692,7 @@ const driver = {
|
||||
};
|
||||
|
||||
driver.initialize = (dbgateEnv) => {
|
||||
platformInfo = dbgateEnv.platformInfo;
|
||||
isProApp = dbgateEnv.isProApp;
|
||||
};
|
||||
|
||||
module.exports = driver;
|
||||
|
||||
Reference in New Issue
Block a user