mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Fix Philips Hue API Connection (#2631)
* 🐛 Fix Philips Hue API Connection
* Philips Hue Node: Fixed typo in update operation description
This commit is contained in:
@@ -74,13 +74,13 @@ export class PhilipsHue implements INodeType {
|
||||
const lights = await philipsHueApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/bridge/${user}/lights`,
|
||||
`/api/${user}/lights`,
|
||||
);
|
||||
|
||||
const groups = await philipsHueApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/bridge/${user}/groups`,
|
||||
`/api/${user}/groups`,
|
||||
);
|
||||
|
||||
for (const light of Object.keys(lights)) {
|
||||
@@ -144,7 +144,7 @@ export class PhilipsHue implements INodeType {
|
||||
const data = await philipsHueApiRequest.call(
|
||||
this,
|
||||
'PUT',
|
||||
`/bridge/${user}/lights/${lightId}/state`,
|
||||
`/api/${user}/lights/${lightId}/state`,
|
||||
body,
|
||||
);
|
||||
|
||||
@@ -161,7 +161,7 @@ export class PhilipsHue implements INodeType {
|
||||
|
||||
const user = await getUser.call(this);
|
||||
|
||||
responseData = await philipsHueApiRequest.call(this, 'DELETE', `/bridge/${user}/lights/${lightId}`);
|
||||
responseData = await philipsHueApiRequest.call(this, 'DELETE', `/api/${user}/lights/${lightId}`);
|
||||
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
@@ -169,7 +169,7 @@ export class PhilipsHue implements INodeType {
|
||||
|
||||
const user = await getUser.call(this);
|
||||
|
||||
const lights = await philipsHueApiRequest.call(this, 'GET', `/bridge/${user}/lights`);
|
||||
const lights = await philipsHueApiRequest.call(this, 'GET', `/api/${user}/lights`);
|
||||
|
||||
responseData = Object.values(lights);
|
||||
|
||||
@@ -183,7 +183,7 @@ export class PhilipsHue implements INodeType {
|
||||
|
||||
const user = await getUser.call(this);
|
||||
|
||||
responseData = await philipsHueApiRequest.call(this, 'GET', `/bridge/${user}/lights/${lightId}`);
|
||||
responseData = await philipsHueApiRequest.call(this, 'GET', `/api/${user}/lights/${lightId}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user