From e379be01072026d26ec550d24218e6c9ee8c6c48 Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Thu, 14 Nov 2024 10:10:15 +0100 Subject: [PATCH] fix --- packages/api/src/main.js | 6 +++++- packages/api/src/utility/checkLicense.js | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/api/src/main.js b/packages/api/src/main.js index ad77278be..9fb3fbe53 100644 --- a/packages/api/src/main.js +++ b/packages/api/src/main.js @@ -36,6 +36,7 @@ const _ = require('lodash'); const { getLogger } = require('dbgate-tools'); const { getDefaultAuthProvider } = require('./auth/authProvider'); const startCloudUpgradeTimer = require('./utility/cloudUpgrade'); +const { isProApp } = require('./utility/checkLicense'); const logger = getLogger('main'); @@ -77,7 +78,10 @@ function start() { } else if (platformInfo.isAwsUbuntuLayout) { app.use(getExpressPath('/'), express.static('/home/ubuntu/build/public')); } else if (platformInfo.isNpmDist) { - app.use(getExpressPath('/'), express.static(path.join(__dirname, '../../dbgate-web/public'))); + app.use( + getExpressPath('/'), + express.static(path.join(__dirname, isProApp() ? '../../dbgate-web-premium/public' : '../../dbgate-web/public')) + ); } else if (process.env.DEVWEB) { // console.log('__dirname', __dirname); // console.log(path.join(__dirname, '../../web/public/build')); diff --git a/packages/api/src/utility/checkLicense.js b/packages/api/src/utility/checkLicense.js index a21a66c40..caefc934a 100644 --- a/packages/api/src/utility/checkLicense.js +++ b/packages/api/src/utility/checkLicense.js @@ -12,7 +12,12 @@ function checkLicenseKey(key) { }; } +function isProApp() { + return false; +} + module.exports = { checkLicense, checkLicenseKey, + isProApp, };