2017-11-15 14:00:51 +01:00

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' });
}
};