1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-14 09:52:09 +03:00
Ghost/core/server/api/v2/roles.js
Nazar Gargol eb0bc3068c Migrated roles controller to API v2
refs 

- Added new controller to v2 API
- Added roles tests to v2 API
2018-10-10 16:48:22 +02:00

20 lines
386 B
JavaScript

const models = require('../../models');
module.exports = {
docName: 'roles',
browse: {
options: [
'permissions'
],
validation: {
options: {
permissions: ['assign']
}
},
permissions: true,
query(frame) {
return models.Role.findAll(frame.options);
}
}
};