Pierre Noël ae0dcb9745 add route GET /admin/permissions
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:05:06 +02:00

16 lines
322 B
JavaScript

'use strict';
module.exports = {
/**
* Returns every permissions, in nested format
* @param {KoaContext} ctx - koa context
*/
async getAll(ctx) {
const allWithNestedFormat = await strapi.admin.permissionProvider.getAllWithNestedFormat();
ctx.body = {
data: allWithNestedFormat,
};
},
};