fix(medusa): product variant metadata (#98)

fix(medusa-plugin-sendgrid): generic email support
This commit is contained in:
Sebastian Rindom
2020-09-04 18:48:14 +02:00
committed by GitHub
parent e24d180ea3
commit 520115a2ce
5 changed files with 51 additions and 42 deletions
@@ -82,14 +82,9 @@ class SendGridService extends BaseService {
* @param {Object} data - data to send in mail (match with template)
* @returns {Promise} result of the send operation
*/
async sendEmail(templateId, from, to, data) {
async sendEmail(options) {
try {
return SendGrid.send({
to,
from,
template_id: templateId,
dynamic_template_data: data,
})
return SendGrid.send(options)
} catch (error) {
throw error
}