mirror of
https://github.com/strapi/strapi.git
synced 2025-07-19 07:02:26 +00:00
17 lines
274 B
JavaScript
17 lines
274 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
async findOne(ctx) {
|
|
const { id } = ctx.params;
|
|
const role = await strapi.admin.services.role.findOne({ id });
|
|
|
|
if (!role) {
|
|
return ctx.notFound('role.notFound');
|
|
}
|
|
|
|
ctx.body = {
|
|
data: role,
|
|
};
|
|
},
|
|
};
|