import DirectusAbstractStore from './DirectusAbstract.js' /** * Pages from Directus * * */ class PageStore extends DirectusAbstractStore { /** * init PageStore * * * @param {string} endpoint * */ constructor() { super('pages') } /** * getting page by permalink * * * @param {string} permalink * @return {object} */ findOneByPermalink(permalink) { return this.items.readByQuery({ fields: [ 'title', 'status', 'permalink', 'meta', 'content' ], filter: { permalink : permalink, status : 'published' }, limit: 1 }) } } export default PageStore