From d7d06653dff29ed29defdf2bf87076651d3fbeb9 Mon Sep 17 00:00:00 2001 From: Rish Date: Thu, 7 Nov 2019 17:03:05 +0700 Subject: [PATCH] Fixed email not returned in put object on post publish --- core/server/api/canary/posts.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/server/api/canary/posts.js b/core/server/api/canary/posts.js index 2d3162940c5a..b4d3c9ded3a3 100644 --- a/core/server/api/canary/posts.js +++ b/core/server/api/canary/posts.js @@ -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 (