backend-manager 3.0.23 → 3.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -74,19 +74,20 @@ Module.prototype.main = function () {
|
|
|
74
74
|
return resolve({data: {success: true}});
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// Log the email payload
|
|
78
|
-
assistant.log('Email payload:', emailPayload, {environment: 'production'});
|
|
79
|
-
|
|
80
77
|
if (emailPayload.delay) {
|
|
81
|
-
emailPayload.
|
|
78
|
+
// emailPayload.payload.sendAt = new Date(new Date().getTime() + (emailPayload.delay * 1000)).toISOString();
|
|
79
|
+
emailPayload.payload.sendAt = Math.round((new Date().getTime() + emailPayload.delay) / 1000);
|
|
82
80
|
}
|
|
83
81
|
|
|
82
|
+
// Log the email payload
|
|
83
|
+
assistant.log('Email payload:', emailPayload, {environment: 'production'});
|
|
84
|
+
|
|
84
85
|
// Send the email
|
|
85
86
|
await fetch(`https://us-central1-itw-creative-works.cloudfunctions.net/sendEmail`, {
|
|
86
87
|
method: 'post',
|
|
87
88
|
response: 'json',
|
|
88
89
|
log: true,
|
|
89
|
-
body: emailPayload.
|
|
90
|
+
body: emailPayload.payload,
|
|
90
91
|
})
|
|
91
92
|
.then(async (json) => {
|
|
92
93
|
assistant.log('Response:', json, {environment: 'production'});
|