Skip to content

Commit

Permalink
fix #129
Browse files Browse the repository at this point in the history
  • Loading branch information
windkh committed Oct 5, 2023
1 parent 3ed2000 commit 4832d41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## [10.14.1] - 2023-10-05
### install webhook problems fixed with next gen 2 fw - [#129](https://github.com/windkh/node-red-contrib-shelly/issues/129)

## [10.14.0] - 2023-10-04
### upload script problems fixed with nex gen 2 fw - [#128](https://github.com/windkh/node-red-contrib-shelly/issues/128)
### upload script problems fixed with next gen 2 fw - [#128](https://github.com/windkh/node-red-contrib-shelly/issues/128)

## [10.13.8] - 2023-09-29
### added support for shelly plus 1 mini - [#127](https://github.com/windkh/node-red-contrib-shelly/issues/127)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-shelly",
"version": "10.14.0",
"version": "10.14.1",
"description": "Shelly nodes.",
"node-red": {
"version": ">=0.1.0",
Expand Down
8 changes: 4 additions & 4 deletions shelly/99-shelly.js
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,7 @@ module.exports = function (RED) {
for (let webhookItem of webhookListResponse.hooks) {
if(webhookItem.name == webhookName){
let deleteParams = { 'id' : webhookItem.id };
let deleteWebhookResonse = await shellyRequestAsync('GET', '/rpc/Webhook.Delete', deleteParams, null, credentials);
let deleteWebhookResonse = await shellyRequestAsync('POST', '/rpc/Webhook.Delete', null, deleteParams, credentials);
}
};

Expand All @@ -1976,14 +1976,14 @@ module.exports = function (RED) {
'enable' : true,
"urls": [url]
};
let createWebhookResonse = await shellyRequestAsync('GET', '/rpc/Webhook.Create', createParams, null, credentials);
let createWebhookResonse = await shellyRequestAsync('POST', '/rpc/Webhook.Create', null, createParams, credentials);

node.status({ fill: "green", shape: "ring", text: "Connected." });
success = true;
}
}
catch (error) {
// node.warn("Installing webhook failed " + error);
//node.warn("Installing webhook failed " + error);
// node.status({ fill: "red", shape: "ring", text: "Installing webhook failed "});
}
}
Expand All @@ -2008,7 +2008,7 @@ module.exports = function (RED) {
for (let webhookItem of webhookListResponse.hooks) {
if(webhookItem.name == webhookName){
let deleteParams = { 'id' : webhookItem.id };
let deleteWebhookResonse = await shellyRequestAsync('GET', '/rpc/Webhook.Delete', deleteParams, null, credentials);
let deleteWebhookResonse = await shellyRequestAsync('POST', '/rpc/Webhook.Delete', null, deleteParams, credentials);
}
};
}
Expand Down

0 comments on commit 4832d41

Please sign in to comment.