@tiledesk/tiledesk-whatsapp-connector 0.1.20 → 0.1.21

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -586,7 +586,7 @@ router.post("/webhook/:project_id", async (req, res) => {
586
586
  console.log("File position: ", filename);
587
587
  if (!filename) {
588
588
  console.log("Unable to download media. Message not sent.");
589
- res.status(500).send({ success: false, error: "unable to download media" })
589
+ return res.status(500).send({ success: false, error: "unable to download media" })
590
590
  }
591
591
  let file_path = path.join(__dirname, 'tmp', filename);
592
592
 
@@ -604,7 +604,7 @@ router.post("/webhook/:project_id", async (req, res) => {
604
604
  console.log("File position: ", filename);
605
605
  if (!filename) {
606
606
  console.log("Unable to download media. Message not sent.");
607
- res.status(500).send({ success: false, error: "unable to download media" })
607
+ return res.status(500).send({ success: false, error: "unable to download media" })
608
608
  }
609
609
  let file_path = path.join(__dirname, 'tmp', filename);
610
610
 
@@ -622,7 +622,7 @@ router.post("/webhook/:project_id", async (req, res) => {
622
622
  console.log("File position: ", filename);
623
623
  if (!filename) {
624
624
  console.log("Unable to download media. Message not sent.");
625
- res.status(500).send({ success: false, error: "unable to download media" })
625
+ return res.status(500).send({ success: false, error: "unable to download media" })
626
626
  }
627
627
  let file_path = path.join(__dirname, 'tmp', filename);
628
628
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-whatsapp-connector",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Tiledesk Whatsapp connector",
5
5
  "main": "index.js",
6
6
  "scripts": {