mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: consolidate plugin reset logic
This commit is contained in:
@@ -119,14 +119,10 @@ async function resetPlugin(pluginId) {
|
||||
const isActive = await db.isSortedSetMember('plugins:active', pluginId);
|
||||
if (isActive) {
|
||||
await db.sortedSetRemove('plugins:active', pluginId);
|
||||
}
|
||||
|
||||
await events.log({
|
||||
type: 'plugin-deactivate',
|
||||
text: pluginId,
|
||||
});
|
||||
|
||||
if (isActive) {
|
||||
await events.log({
|
||||
type: 'plugin-deactivate',
|
||||
text: pluginId,
|
||||
});
|
||||
winston.info('[reset] Plugin `%s` disabled', pluginId);
|
||||
} else {
|
||||
winston.warn('[reset] Plugin `%s` was not active on this forum', pluginId);
|
||||
|
||||
Reference in New Issue
Block a user