diff --git a/core/server/api/canary/index.js b/core/server/api/canary/index.js index 6e28601d4f..89ce8b261f 100644 --- a/core/server/api/canary/index.js +++ b/core/server/api/canary/index.js @@ -107,6 +107,10 @@ module.exports = { return shared.pipeline(require('./actions'), localUtils); }, + get email_preview() { + return shared.pipeline(require('./email-preview'), localUtils); + }, + get site() { return shared.pipeline(require('./site'), localUtils); }, diff --git a/core/server/api/canary/utils/serializers/output/email-preview.js b/core/server/api/canary/utils/serializers/output/email-preview.js new file mode 100644 index 0000000000..abac02a04a --- /dev/null +++ b/core/server/api/canary/utils/serializers/output/email-preview.js @@ -0,0 +1,7 @@ +module.exports = { + read(emailPreview, apiConfig, frame) { + frame.response = { + email_previews: [emailPreview] + }; + } +}; diff --git a/core/server/api/canary/utils/serializers/output/index.js b/core/server/api/canary/utils/serializers/output/index.js index e391ddff04..f3742ae553 100644 --- a/core/server/api/canary/utils/serializers/output/index.js +++ b/core/server/api/canary/utils/serializers/output/index.js @@ -101,5 +101,9 @@ module.exports = { get site() { return require('./site'); + }, + + get email_preview() { + return require('./email-preview'); } };