mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 13:36:01 +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) {
|
Plugins.suggest = function(pluginId, callback) {
|
||||||
var nbbVersion = app.config.version.match(/^\d\.\d\.\d/);
|
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',
|
type: 'GET',
|
||||||
data: {
|
data: {
|
||||||
package: pluginId,
|
package: pluginId,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ module.exports = function(Meta) {
|
|||||||
db.getObject('config', function (err, config) {
|
db.getObject('config', function (err, config) {
|
||||||
config = config || {};
|
config = config || {};
|
||||||
config.version = nconf.get('version');
|
config.version = nconf.get('version');
|
||||||
|
config.registry = nconf.get('registry');
|
||||||
callback(err, config);
|
callback(err, config);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user