Ghost/core/server/api/v2/members.js
Rishabh Garg 8fd4b3f09f
Added new admin API for members (#10435)
no issue

- Added read and browse admin API for members
2019-01-30 17:06:09 +05:30

36 lines
729 B
JavaScript

const memberUserObject = require('../../services/members').api.memberUserObject;
const members = {
docName: 'members',
browse: {
options: [
'limit',
'fields',
'filter',
'order',
'debug',
'page'
],
permissions: true,
validation: {},
query(frame) {
return memberUserObject.list(frame.options);
}
},
read: {
headers: {},
data: [
'id',
'email'
],
validation: {},
permissions: true,
query(frame) {
return memberUserObject.get(frame.data, frame.options);
}
}
};
module.exports = members;