mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 15:41:56 +00:00
fix:修改配置模块
This commit is contained in:
parent
726dc3ef35
commit
57ab9c611a
@ -70,7 +70,7 @@ async function init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!Array.isArray(configCache)) {
|
if (!Array.isArray(configCache)) {
|
||||||
configCache = fc.mergeConfig(configCache, defaultConfig);
|
configCache = fc.mergeConfig(configCache, configCache.config || {});
|
||||||
}
|
}
|
||||||
if (configCache.debug) {
|
if (configCache.debug) {
|
||||||
logger.info('[crystelf-plugin] 配置模块初始化成功..');
|
logger.info('[crystelf-plugin] 配置模块初始化成功..');
|
||||||
|
|||||||
14
lib/core/meme.js
Normal file
14
lib/core/meme.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import ConfigControl from '../config/configControl.js';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
const Meme = {
|
||||||
|
async getMeme(character, status) {
|
||||||
|
const coreConfig = await ConfigControl.get()?.coreConfig;
|
||||||
|
const coreUrl = coreConfig?.coreUrl;
|
||||||
|
const token = coreConfig?.token;
|
||||||
|
//logger.info(`${coreUrl}/api/meme`);
|
||||||
|
return `${coreUrl}/api/meme?token=${token}?character=${character}&status=${status}`;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Meme;
|
||||||
Loading…
x
Reference in New Issue
Block a user