nodebb-plugin-webhooks 2.0.0 → 2.0.1

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 +2 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  'use strict';
3
2
 
4
3
  const https = require('https');
@@ -47,6 +46,7 @@ plugin.onHookFired = async function (hookData) {
47
46
  hash.update(JSON.stringify(hookData));
48
47
  signature = `sha1=${hash.digest('hex')}`;
49
48
  }
49
+ // eslint-disable-next-line no-await-in-loop
50
50
  await makeRequest(hook.endpoint, hookData, signature);
51
51
  }
52
52
  }
@@ -85,7 +85,7 @@ async function makeRequest(endpoint, hookData, signature) {
85
85
  });
86
86
  }
87
87
  try {
88
- const { status, data } = await axios.post(endpoint, hookData, )
88
+ const { status, data } = await axios.post(endpoint, hookData, axiosOptions);
89
89
  if (status !== 200) {
90
90
  winston.error(`[nodebb-plugin-webhooks] ${status} ${data}`);
91
91
  }
@@ -106,7 +106,6 @@ plugin.admin.menu = function (menu, callback) {
106
106
  setImmediate(callback, null, menu);
107
107
  };
108
108
 
109
-
110
109
  socketAdmin.plugins.webhooks = {};
111
110
  socketAdmin.plugins.webhooks.save = async function (socket, data) {
112
111
  await db.set('nodebb-plugin-webhooks', JSON.stringify(data));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-webhooks",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A Plugin that pings end points when a hook is triggered",
5
5
  "main": "index.js",
6
6
  "repository": {