Fix settings-manager description typo, expose only the needed informations in /plugins

This commit is contained in:
cyril lopez 2017-11-09 13:30:54 +01:00
parent f3bddb77c8
commit aa3de8a310
5 changed files with 10 additions and 13 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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' }] }]);
}

View File

@ -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",

View File

@ -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);
}