mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Pass params to testVariables function; add debug output for email variables
This commit is contained in:
parent
cdb702cddd
commit
adabf3882f
1 changed files with 6 additions and 1 deletions
|
@ -15,7 +15,7 @@ Meteor.startup(function() {
|
||||||
|
|
||||||
// else get test object (sample post, comment, user, etc.)
|
// else get test object (sample post, comment, user, etc.)
|
||||||
const testVariables =
|
const testVariables =
|
||||||
(typeof email.testVariables === 'function' ? email.testVariables() : email.testVariables) || {};
|
(typeof email.testVariables === 'function' ? email.testVariables(params) : email.testVariables) || {};
|
||||||
// delete params.query so we don't pass it to GraphQL query
|
// delete params.query so we don't pass it to GraphQL query
|
||||||
delete params.query;
|
delete params.query;
|
||||||
// merge test variables with params from URL
|
// merge test variables with params from URL
|
||||||
|
@ -33,6 +33,11 @@ Meteor.startup(function() {
|
||||||
html = `
|
html = `
|
||||||
${builtHtml}
|
${builtHtml}
|
||||||
<h4 style="margin: 20px;"><code>Subject: ${subject}</code></h4>
|
<h4 style="margin: 20px;"><code>Subject: ${subject}</code></h4>
|
||||||
|
<h5 style="margin: 20px;">Variables:</h5>
|
||||||
|
<div style="border: 1px solid #999; padding: 10px 20px; margin: 20px;">
|
||||||
|
<pre><code>${JSON.stringify(variables, null, 2)}</code></pre>
|
||||||
|
</div>
|
||||||
|
<h5 style="margin: 20px;">Data:</h5>
|
||||||
<div style="border: 1px solid #999; padding: 10px 20px; margin: 20px;">
|
<div style="border: 1px solid #999; padding: 10px 20px; margin: 20px;">
|
||||||
<pre><code>${JSON.stringify(emailTestData, null, 2)}</code></pre>
|
<pre><code>${JSON.stringify(emailTestData, null, 2)}</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue