2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Added status=all by default to preview api

This commit is contained in:
Rish 2019-11-06 18:18:28 +07:00
parent 81b9018526
commit 77daa77e04

View file

@ -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({