mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 01:26:01 +00:00
fixes
This commit is contained in:
@@ -13,7 +13,7 @@ const platformInfo = require('../utility/platformInfo');
|
|||||||
const connections = require('../controllers/connections');
|
const connections = require('../controllers/connections');
|
||||||
const { getAuthProviderFromReq } = require('../auth/authProvider');
|
const { getAuthProviderFromReq } = require('../auth/authProvider');
|
||||||
const { checkLicense, checkLicenseKey } = require('../utility/checkLicense');
|
const { checkLicense, checkLicenseKey } = require('../utility/checkLicense');
|
||||||
const { storageWriteConfig } = require('./storageDb');
|
const storage = require('./storage');
|
||||||
|
|
||||||
const lock = new AsyncLock();
|
const lock = new AsyncLock();
|
||||||
|
|
||||||
@@ -146,7 +146,8 @@ module.exports = {
|
|||||||
async saveLicenseKey({ licenseKey }) {
|
async saveLicenseKey({ licenseKey }) {
|
||||||
try {
|
try {
|
||||||
if (process.env.STORAGE_DATABASE) {
|
if (process.env.STORAGE_DATABASE) {
|
||||||
await storageWriteConfig('license', { licenseKey });
|
await storage.writeConfig({ group: 'license', config: { licenseKey } });
|
||||||
|
// await storageWriteConfig('license', { licenseKey });
|
||||||
} else {
|
} else {
|
||||||
await fs.writeFile(path.join(datadir(), 'license.key'), licenseKey);
|
await fs.writeFile(path.join(datadir(), 'license.key'), licenseKey);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
function checkLicenseWeb() {
|
function checkLicense() {
|
||||||
return {
|
|
||||||
status: 'ok',
|
|
||||||
type: 'community',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkLicenseApp() {
|
|
||||||
return {
|
return {
|
||||||
status: 'ok',
|
status: 'ok',
|
||||||
type: 'community',
|
type: 'community',
|
||||||
@@ -13,6 +6,5 @@ function checkLicenseApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
checkLicenseWeb,
|
checkLicense,
|
||||||
checkLicenseApp,
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user