mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
Fixed post not showing authors in email
no issue
This commit is contained in:
parent
eaf7289af3
commit
6d1de1b912
@ -52,7 +52,7 @@ module.exports = {
|
||||
permissions: true,
|
||||
async query(frame) {
|
||||
const options = Object.assign(frame.options, {status: 'all'});
|
||||
let model = await models.Post.findOne(options);
|
||||
let model = await models.Post.findOne(options, {withRelated: ['authors']});
|
||||
if (!model) {
|
||||
throw new common.errors.NotFoundError({
|
||||
message: common.i18n.t('errors.api.posts.postNotFound')
|
||||
|
@ -166,8 +166,7 @@ async function listener(emailModel, options) {
|
||||
if (options && options.importing) {
|
||||
return;
|
||||
}
|
||||
|
||||
const postModel = await models.Post.findOne({id: emailModel.get('post_id')});
|
||||
const postModel = await models.Post.findOne({id: emailModel.get('post_id')}, {withRelated: ['authors']});
|
||||
|
||||
const post = await serialize(postModel);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user