Skip to content

Commit

Permalink
Fixed email not returned in put object on post publish
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhgrg committed Nov 7, 2019
1 parent cc581c6 commit d7d0665
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions core/server/api/canary/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,10 @@ module.exports = {

if (!model.get('email') && (model.get('status') === 'published') && model.wasChanged()) {
const email = await mega.addEmail(model.toJSON());

if (frame.options.include && frame.options.includes('email')) {
model.set('email', email);
}

return model;
} else {
return model;
model.set('email', email);
}

return model;
})
.then((model) => {
if (
Expand Down

0 comments on commit d7d0665

Please sign in to comment.