Initial attempt

Lacking an end to end test on this code presently.
This commit is contained in:
Philip Abbey
2025-08-08 11:40:13 +01:00
parent 8a8d64bcab
commit c1cddc54e4
10 changed files with 78 additions and 24 deletions

View File

@ -113,10 +113,10 @@ class WebhookManager {
},
{
:method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => {
:headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON,
"Authorization" => "Bearer " + Settings.getApiKey()
},
}),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
},
method(:onReturnRequestWebhookId)
@ -230,9 +230,9 @@ class WebhookManager {
},
{
:method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => {
:headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
},
}),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON,
:context => sensors.slice(1, null)
},