mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
Added status=all by default to preview api
This commit is contained in:
parent
81b9018526
commit
77daa77e04
@ -21,7 +21,8 @@ module.exports = {
|
||||
permissions: true,
|
||||
query(frame) {
|
||||
const options = Object.assign(frame.options, {formats: 'html,plaintext', withRelated: ['authors']});
|
||||
return models.Post.findOne(frame.data, options)
|
||||
const data = Object.assign(frame.data, {status: 'all'});
|
||||
return models.Post.findOne(data, options)
|
||||
.then((model) => {
|
||||
if (!model) {
|
||||
throw new common.errors.NotFoundError({
|
||||
|
Loading…
Reference in New Issue
Block a user