mirror of
https://github.com/strapi/strapi.git
synced 2025-07-08 17:45:30 +00:00
36 lines
566 B
JavaScript
36 lines
566 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* UsersPermissions.js controller
|
|
*
|
|
* @description: A set of functions called "actions" of the `users-permissions` plugin.
|
|
*/
|
|
|
|
module.exports = {
|
|
|
|
/**
|
|
* Default action.
|
|
*
|
|
* @return {Object}
|
|
*/
|
|
getRole: async(ctx) => {
|
|
const { id } = ctx.params;
|
|
|
|
ctx.send({ ok: true });
|
|
},
|
|
|
|
index: async (ctx) => {
|
|
// Add your own logic here.
|
|
|
|
// Send 200 `ok`
|
|
ctx.send({
|
|
message: 'ok'
|
|
});
|
|
},
|
|
|
|
init: async (ctx) => {
|
|
// Will be deleted
|
|
ctx.send({ hasAdmin: ctx.params.hasAdmin === 'true' });
|
|
}
|
|
};
|