mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
Get registry (if it's set) from config.json in suggest method (client-side)
This commit is contained in:
@@ -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 ? 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);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user