mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Fix PR feedback
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
a9a978466e
commit
16261bb156
@ -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();
|
||||
|
||||
@ -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]);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user