Fix PR feedback

Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
soupette 2020-08-31 14:17:30 +02:00
parent a9a978466e
commit 16261bb156
2 changed files with 1 additions and 10 deletions

View File

@ -64,11 +64,6 @@ module.exports = {
async getPermissions(ctx) {
try {
// @alexandrebodin I am removing this as it is not needed anymore
// const { lang } = ctx.query;
// const plugins = await strapi.plugins[
// 'users-permissions'
// ].services.userspermissions.getPlugins(lang);
const permissions = await strapi.plugins[
'users-permissions'
].services.userspermissions.getActions();

View File

@ -141,7 +141,7 @@ module.exports = {
});
},
getActions(plugins = [], withInfo = true) {
getActions() {
const generateActions = data =>
Object.keys(data).reduce((acc, key) => {
if (_.isFunction(data[key])) {
@ -169,10 +169,6 @@ module.exports = {
controllers: {},
};
if (withInfo) {
initialState.information = plugins.find(plugin => plugin.id === key) || {};
}
acc[key] = Object.keys(strapi.plugins[key].controllers).reduce((obj, k) => {
obj.controllers[k] = generateActions(strapi.plugins[key].controllers[k]);