0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/api/canary/newsletters-public.js
Rishabh Garg 9f85f7a4fe
Added newsletters endpoint to Content API (#14778)
refs https://github.com/TryGhost/Team/issues/1599

- allows active newsletters data to be fetched via content API
2022-05-11 21:36:43 +05:30

19 lines
369 B
JavaScript

const models = require('../../models');
module.exports = {
docName: 'newsletters',
browse: {
options: [
'filter',
'fields',
'limit',
'order',
'page'
],
permissions: true,
query(frame) {
return models.Newsletter.findPage(frame.options);
}
}
};