mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-07 02:52:32 +02:00
Fix a myriad of problems with the ACP/Plugins page
- Fixed #3350 - Fixed issue where the normalised API return would have the wrong id for all plugins - Fixed issue where uninstalling a locally installed plugin via ACP would cause NodeBB to crash - Simplified ACP/Plugins client-side code to simply refresh the page after installing or uninstalling a plugin.
This commit is contained in:
@@ -170,9 +170,13 @@ var fs = require('fs'),
|
||||
require('request')(url, {
|
||||
json: true
|
||||
}, function(err, res, body) {
|
||||
if (res.statusCode === 404 || !body.payload) {
|
||||
return callback(err, {});
|
||||
}
|
||||
|
||||
Plugins.normalise([body.payload], function(err, normalised) {
|
||||
normalised = normalised.filter(function(plugin) {
|
||||
return plugin.id = id;
|
||||
return plugin.id === id;
|
||||
});
|
||||
return callback(err, !err ? normalised[0] : undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user