setRemove doesnt return result

v1.18.x
barisusakli 10 years ago
parent ee820341d5
commit 38e7ecbb41

@ -328,14 +328,9 @@ function resetThemes(callback) {
function resetPlugin(pluginId) { function resetPlugin(pluginId) {
var db = require('./src/database'); var db = require('./src/database');
db.setRemove('plugins:active', pluginId, function(err, result) { db.setRemove('plugins:active', pluginId, function(err) {
if (err || result !== 1) {
winston.error('[reset] Could not disable plugin: %s', pluginId);
if (err) { if (err) {
winston.error('[reset] Encountered error: %s', err.message); winston.error('[reset] Could not disable plugin: %s encountered error %s', pluginId, err.message);
} else {
winston.info('[reset] Perhaps it has already been disabled?');
}
} else { } else {
winston.info('[reset] Plugin `%s` disabled', pluginId); winston.info('[reset] Plugin `%s` disabled', pluginId);
} }

Loading…
Cancel
Save