mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
25 lines
489 B
JavaScript
25 lines
489 B
JavaScript
|
class NewslettersService {
|
||
|
/**
|
||
|
*
|
||
|
* @param {Object} options
|
||
|
* @param {Object} options.NewsletterModel
|
||
|
*/
|
||
|
constructor({NewsletterModel}) {
|
||
|
this.NewsletterModel = NewsletterModel;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param {Object} options browse options
|
||
|
* @returns
|
||
|
*/
|
||
|
async browse(options) {
|
||
|
let newsletters = await this.NewsletterModel.findAll(options);
|
||
|
|
||
|
return newsletters.toJSON();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = NewslettersService;
|
||
|
|