From f409afe516f693e52eb49b7f7167b36144eaa16e Mon Sep 17 00:00:00 2001 From: Paul Aschmann <> Date: Wed, 10 Aug 2022 15:14:51 -0400 Subject: [PATCH] no message --- {providers => resources}/_template.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {providers => resources}/_template.js (71%) diff --git a/providers/_template.js b/resources/_template.js similarity index 71% rename from providers/_template.js rename to resources/_template.js index c18ac5a..b06746f 100644 --- a/providers/_template.js +++ b/resources/_template.js @@ -1,16 +1,15 @@ // This is a non-functioning template to use as a reference when creating a new provider // Please import this provider and declare it in root reach.js file - const provider = require("./provider"); // Import any dependencies, be sure to include them in the package.json file const axios = require("axios"); // Change the class name -class Slack extends provider { +class ProviderName extends provider { // Required - name of the provider - name = "slack"; + name = "providername"; // Define the required and optional parameters for the provider parameters = { @@ -32,13 +31,13 @@ class Slack extends provider { // Example: Send email with defined transporter object await transporter.sendMail({ from: notification.required.from, - cc: notification.optional.cc, - bcc: notification.optional.bcc, to: notification.required.to, subject: notification.required.subject, text: notification.required.text, - html: notification.optional.html, - attachments: notification.optional.attachments + ... (notification.optional.cc && { attachments: notification.optional.cc }), + ... (notification.optional.bcc && { attachments: notification.optional.bcc }), + ... (notification.optional.html && { attachments: notification.optional.html }), + ... (notification.optional.attachments && { attachments: notification.optional.attachments }), }); return "Sent Successfully."; @@ -48,4 +47,4 @@ class Slack extends provider { } } -module.exports = SES; \ No newline at end of file +module.exports = ProviderName; \ No newline at end of file