mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
license checker
This commit is contained in:
@@ -44,6 +44,7 @@ module.exports = {
|
||||
isDocker: platformInfo.isDocker,
|
||||
isElectron: platformInfo.isElectron,
|
||||
isLicenseValid: platformInfo.isLicenseValid,
|
||||
licenseError: platformInfo.licenseError,
|
||||
permissions,
|
||||
login,
|
||||
...additionalConfigProps,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function checkLicense() {
|
||||
return true;
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -13,7 +13,8 @@ const isDocker = fs.existsSync('/home/dbgate-docker/public');
|
||||
const isDevMode = process.env.DEVMODE == '1';
|
||||
const isNpmDist = !!global['IS_NPM_DIST'];
|
||||
const isForkedApi = processArgs.isForkedApi;
|
||||
const isLicenseValid = checkLicense();
|
||||
const licenseError = checkLicense();
|
||||
const isLicenseValid = licenseError == null;
|
||||
|
||||
// function moduleAvailable(name) {
|
||||
// try {
|
||||
@@ -33,6 +34,7 @@ const platformInfo = {
|
||||
isForkedApi,
|
||||
isElectron: isElectron(),
|
||||
isLicenseValid,
|
||||
licenseError,
|
||||
isDevMode,
|
||||
isNpmDist,
|
||||
isSnap: process.env.ELECTRON_SNAP == 'true',
|
||||
|
||||
Reference in New Issue
Block a user