From 1ead9205da8760d22b5cdbcf6351d02fa0d87678 Mon Sep 17 00:00:00 2001 From: foomoon Date: Tue, 30 Jan 2024 14:49:48 -0600 Subject: [PATCH] fix to push json rather than number --- dist/lib/light.js | 2 +- src/lib/light.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/lib/light.js b/dist/lib/light.js index e488514..7090806 100644 --- a/dist/lib/light.js +++ b/dist/lib/light.js @@ -697,7 +697,7 @@ export class Light { // id must be between 0 and 15 if (id < 0 || id > 15) throw new Error("ID must be between 0 and 15"); - let res = yield this.sendPostRequest("/movies/current", id); + let res = yield this.sendPostRequest("/movies/current", { id }); return res; }); } diff --git a/src/lib/light.ts b/src/lib/light.ts index b233766..50e258c 100644 --- a/src/lib/light.ts +++ b/src/lib/light.ts @@ -668,7 +668,7 @@ export class Light { async setCurrentMovie(id: number): Promise { // id must be between 0 and 15 if (id < 0 || id > 15) throw new Error("ID must be between 0 and 15"); - let res = await this.sendPostRequest("/movies/current", id); + let res = await this.sendPostRequest("/movies/current", { id }); return res; } /**