🐛 Fixed sending feedback on email only posts

fixes https://github.com/TryGhost/Team/issues/2220

`Post.findOne` is filtering by status 'published' by default. 'sent' isn't 'published' so we throw a 404 error when trying to send feedback to a 'sent' post.
This commit is contained in:
Simon Backx 2022-11-07 16:27:43 +01:00
parent 96aa0e6ba6
commit 3048c7e790

View File

@ -62,6 +62,6 @@ module.exports = class FeedbackRepository {
}
async getPostById(id) {
return await this.#Post.findOne({id});
return await this.#Post.findOne({id, status: 'all'});
}
};