mirror of
https://github.com/crystelf/crystelf-admin.git
synced 2025-12-05 13:41:57 +00:00
fix:修复部分配置问题
This commit is contained in:
parent
9ed695dca2
commit
5add485556
@ -18,7 +18,7 @@ export default class CoreRestart extends plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async restart(e) {
|
async restart(e) {
|
||||||
if (!configControl.get('core')) {
|
if (!configControl.get('config')?.core) {
|
||||||
return e.reply(`晶灵核心未启用..`, true);
|
return e.reply(`晶灵核心未启用..`, true);
|
||||||
}
|
}
|
||||||
const returnData = await systemControl.systemRestart();
|
const returnData = await systemControl.systemRestart();
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
import configControl from '../config/configControl.js';
|
import configControl from '../config/configControl.js';
|
||||||
|
import wsClient from '../../modules/ws/wsClient.js';
|
||||||
|
|
||||||
export const crystelfInit = {
|
export const crystelfInit = {
|
||||||
async CSH() {
|
async CSH() {
|
||||||
await configControl.init();
|
await configControl.init();
|
||||||
|
await wsClient.initialize();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -19,12 +19,12 @@ class WsClient {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.wsURL = configControl.get('coreConfig')?.wsUrl;
|
this.wsURL = configControl.get('config')?.coreConfig?.coreUrl;
|
||||||
this.secret = configControl.get('coreConfig')?.wsSecret;
|
this.secret = configControl.get('config')?.coreConfig?.wsSecret;
|
||||||
this.clientId = configControl.get('coreConfig')?.wsClientId;
|
this.clientId = configControl.get('config')?.coreConfig?.wsClientId;
|
||||||
this.reconnectInterval = configControl.get('coreConfig')?.wsReConnectInterval;
|
this.reconnectInterval = configControl.get('config')?.coreConfig?.wsReConnectInterval;
|
||||||
|
|
||||||
//logger.info(this.wsURL);
|
//logger.info(configControl.get('config'));
|
||||||
this.ws = new WebSocket(this.wsURL);
|
this.ws = new WebSocket(this.wsURL);
|
||||||
|
|
||||||
this.ws.on('open', () => {
|
this.ws.on('open', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user