mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 02:16:03 +00:00
Fix settings-manager description typo, expose only the needed informations in /plugins
This commit is contained in:
parent
f3bddb77c8
commit
aa3de8a310
@ -18,13 +18,7 @@ export function getPlugins() {
|
||||
};
|
||||
}
|
||||
|
||||
export function getPluginsSucceeded(data) {
|
||||
const plugins = Object.keys(data.plugins).reduce((acc, key) => {
|
||||
acc[key] = data.plugins[key].package.strapi;
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
export function getPluginsSucceeded({ plugins }) {
|
||||
return {
|
||||
type: GET_PLUGINS_SUCCEEDED,
|
||||
plugins,
|
||||
|
||||
@ -63,9 +63,7 @@ export class ListPluginsPage extends React.Component { // eslint-disable-line re
|
||||
}
|
||||
}
|
||||
|
||||
ListPluginsPage.contextTypes = {
|
||||
// plugins: PropTypes.object,
|
||||
};
|
||||
ListPluginsPage.contextTypes = {};
|
||||
|
||||
ListPluginsPage.propTypes = {
|
||||
getPlugins: PropTypes.func.isRequired,
|
||||
|
||||
@ -45,7 +45,13 @@ module.exports = {
|
||||
|
||||
plugins: async ctx => {
|
||||
try {
|
||||
ctx.send({ plugins: strapi.plugins });
|
||||
const plugins = Object.keys(strapi.plugins).reduce((acc, key) => {
|
||||
acc[key] = strapi.plugins[key].package.strapi;
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
ctx.send({ plugins });
|
||||
} catch(err) {
|
||||
ctx.badRequest(null, [{ messages: [{ id: 'An error occured' }] }]);
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"plugin.description": "Configurate your project in seconds",
|
||||
"plugin.description": "Configure your project in seconds",
|
||||
"menu.section.global-settings": "Global settings",
|
||||
"menu.item.application": "Application",
|
||||
"menu.item.languages": "Languages",
|
||||
|
||||
@ -33,7 +33,6 @@ module.exports = function() {
|
||||
new Promise((resolve, reject) => {
|
||||
// Load configurations.
|
||||
glob('{./plugins/*/!(config|node_modules)/*.*(js|json),./plugins/*/package.json}', {}, (err, files) => {
|
||||
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user