mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
34 lines
809 B
JavaScript
34 lines
809 B
JavaScript
|
const models = require('../../models');
|
||
|
|
||
|
module.exports = {
|
||
|
docName: 'pages',
|
||
|
browse: {
|
||
|
options: [
|
||
|
'include',
|
||
|
'filter',
|
||
|
'status',
|
||
|
'fields',
|
||
|
'formats',
|
||
|
'absolute_urls',
|
||
|
'page',
|
||
|
'limit',
|
||
|
'order',
|
||
|
'debug'
|
||
|
],
|
||
|
validation: {
|
||
|
options: {
|
||
|
include: {
|
||
|
values: ['created_by', 'updated_by', 'published_by', 'author', 'tags', 'authors', 'authors.roles']
|
||
|
},
|
||
|
formats: {
|
||
|
values: models.Post.allowedFormats
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
permissions: true,
|
||
|
query(frame) {
|
||
|
return models.Post.findPage(frame.options);
|
||
|
}
|
||
|
}
|
||
|
};
|