Squashed commit of the following:

commit 3a39e5e6bd3c357d78d8ec1dad6e3a64c18ee3ab
Author: Julian Lam <julian@designcreateplay.com>
Date:   Tue Nov 3 20:15:10 2015 -0500

    minor tweak

commit ed3c25ba8b431a2b730aae78a43cfa934521a5d4
Merge: d9cde96 d7a0adc
Author: Julian Lam <julian@designcreateplay.com>
Date:   Tue Nov 3 20:12:32 2015 -0500

    Merge branch 'master' of https://github.com/acardinale/NodeBB into acardinale-master

commit d7a0adc5c883c5fa3207f3adcd0661246221e7c9
Author: Andrea Cardinale <a.cardinale@webandtech.it>
Date:   Wed Sep 30 10:32:25 2015 +0200

    Get registry (if it's set) from config.json in suggest method (client-side)
v1.18.x
Julian Lam 9 years ago
parent a5198f127b
commit ceaa3a334d

@ -213,7 +213,7 @@ define('admin/extend/plugins', function() {
Plugins.suggest = function(pluginId, callback) {
var nbbVersion = app.config.version.match(/^\d\.\d\.\d/);
$.ajax('https://packages.nodebb.org/api/v1/suggest', {
$.ajax((app.config.registry || 'https://packages.nodebb.org') + '/api/v1/suggest', {
type: 'GET',
data: {
package: pluginId,

@ -32,6 +32,7 @@ module.exports = function(Meta) {
db.getObject('config', function (err, config) {
config = config || {};
config.version = nconf.get('version');
config.registry = nconf.get('registry');
callback(err, config);
});
};

Loading…
Cancel
Save