This commit is contained in:
庄建国 2022-07-06 05:47:12 +00:00
commit f27e7b6857
2 changed files with 5 additions and 4 deletions

View File

@ -572,7 +572,7 @@ actions:
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
console.error(XMLHttpRequest.responseJSON);
toastr.error(jqXHR.responseText);
toastr.error(XMLHttpRequest.responseText);
$(document.body).removeClass('loading');
}
};

View File

@ -263,9 +263,7 @@ module.exports = {
const settings = this.settings;
const spaceId = settings.STEEDOS_CLOUD_SPACE_ID;
const apiKey = settings.STEEDOS_CLOUD_API_KEY;
// 未配置环境变量时,不执行初始化,也不报错
if (!spaceId || !apiKey)
return;
// console.log(chalk.blue('steedos-server.started'));
const records = await objectql.getObject('spaces').directFind({top: 1, fields: ['_id'], sort: {created: -1}});
const steedosConfig = objectql.getSteedosConfig();
@ -274,6 +272,9 @@ module.exports = {
}else{
steedosConfig.setTenant({enable_create_tenant : true, enable_register: true});
}
// 未配置环境变量时,不执行初始化,也不报错
if (!spaceId || !apiKey)
return;
const allowInit = await this.allowInit(records);
if (!allowInit) {
Initializing = false;