mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 06:37:20 +02:00
feat: autocomplete for activate/reset
useless features™️
This commit is contained in:
@@ -25,6 +25,9 @@ async function activate(plugin) {
|
||||
// Allow omission of `nodebb-plugin-`
|
||||
plugin = `nodebb-plugin-${plugin}`;
|
||||
}
|
||||
|
||||
plugin = await plugins.autocomplete(plugin);
|
||||
|
||||
const isInstalled = await plugins.isInstalled(plugin);
|
||||
if (!isInstalled) {
|
||||
throw new Error('plugin not installed');
|
||||
|
||||
@@ -25,6 +25,7 @@ exports.reset = async function (options) {
|
||||
themeId = `nodebb-theme-${themeId}`;
|
||||
}
|
||||
|
||||
themeId = await plugins.autocomplete(themeId);
|
||||
await resetTheme(themeId);
|
||||
}
|
||||
},
|
||||
@@ -38,6 +39,7 @@ exports.reset = async function (options) {
|
||||
pluginId = `nodebb-plugin-${pluginId}`;
|
||||
}
|
||||
|
||||
pluginId = await plugins.autocomplete(pluginId);
|
||||
await resetPlugin(pluginId);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user