const memberUserObject = require('../../services/members').api.members; 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); } }, destroy: { statusCode: 204, headers: {}, options: [ 'id' ], validation: { options: { id: { required: true } } }, permissions: true, query(frame) { frame.options.require = true; return memberUserObject.destroy(frame.options).return(null); } } }; module.exports = members;