diff --git a/config.old.json b/config.old.json new file mode 100644 index 0000000000..b0f3cfe307 --- /dev/null +++ b/config.old.json @@ -0,0 +1,12 @@ +{ + "url": "http://localhost:4567", + "secret": "c94bef98-bcf2-41ee-a00a-0e024b7ac83f", + "database": "redis", + "redis": { + "host": "127.0.0.1", + "port": "6379", + "password": "0701", + "database": "0" + }, + "port": "4567" +} \ No newline at end of file diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000000..77aa69796e Binary files /dev/null and b/dump.rdb differ diff --git a/src/cli/manage.js b/src/cli/manage.js index 82472d115e..aef8230d64 100644 --- a/src/cli/manage.js +++ b/src/cli/manage.js @@ -129,6 +129,8 @@ async function listPlugins() { } async function listEvents(count = 10) { + // Log a message to confirm this function is triggered + console.log('yuqi'); await db.init(); const eventData = await events.getEvents({ filter: '', @@ -137,10 +139,15 @@ async function listEvents(count = 10) { }); console.log(chalk.bold(`\nDisplaying last ${count} administrative events...`)); eventData.forEach((event) => { - console.log(` * ${chalk.green(String(event.timestampISO))} ${chalk.yellow(String(event.type))}${event.text ? ` ${event.text}` : ''} (uid: ${event.uid ? event.uid : 0})`); + const timestamp = chalk.green(String(event.timestampISO)); + const type = chalk.yellow(String(event.type)); + const textPart = event.text ? ` ${event.text}` : ''; + const uidPart = event.uid ? event.uid : 0; + console.log(` * ${timestamp} ${type}${textPart} (uid: ${uidPart})`); }); process.exit(); } +// recieved help from chatgpt async function info() { console.log('');