mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 09:25:45 +01:00
chore: eslint prefer-template
This commit is contained in:
committed by
Julian Lam
parent
4ee0f1459d
commit
707b55b6a5
@@ -162,7 +162,7 @@ Plugins.reloadRoutes = async function (params) {
|
||||
};
|
||||
|
||||
Plugins.get = async function (id) {
|
||||
const url = (nconf.get('registry') || 'https://packages.nodebb.org') + '/api/v1/plugins/' + id;
|
||||
const url = `${nconf.get('registry') || 'https://packages.nodebb.org'}/api/v1/plugins/${id}`;
|
||||
const body = await request(url, {
|
||||
json: true,
|
||||
});
|
||||
@@ -177,14 +177,14 @@ Plugins.list = async function (matching) {
|
||||
matching = true;
|
||||
}
|
||||
const version = require(paths.currentPackage).version;
|
||||
const url = (nconf.get('registry') || 'https://packages.nodebb.org') + '/api/v1/plugins' + (matching !== false ? '?version=' + version : '');
|
||||
const url = `${nconf.get('registry') || 'https://packages.nodebb.org'}/api/v1/plugins${matching !== false ? `?version=${version}` : ''}`;
|
||||
try {
|
||||
const body = await request(url, {
|
||||
json: true,
|
||||
});
|
||||
return await Plugins.normalise(body);
|
||||
} catch (err) {
|
||||
winston.error('Error loading ' + url, err);
|
||||
winston.error(`Error loading ${url}`, err);
|
||||
return await Plugins.normalise([]);
|
||||
}
|
||||
};
|
||||
@@ -330,7 +330,7 @@ async function findNodeBBModules(dirs) {
|
||||
return next();
|
||||
}
|
||||
|
||||
pluginPaths.push(dirname + '/' + subdir);
|
||||
pluginPaths.push(`${dirname}/${subdir}`);
|
||||
next();
|
||||
});
|
||||
}, cb);
|
||||
|
||||
Reference in New Issue
Block a user