updated as in the objectHeaterApi

This commit is contained in:
csawatzky 2025-04-21 14:39:04 -06:00
parent 59356aad27
commit 29902bc40b
6 changed files with 25 additions and 22 deletions

View file

@ -140,7 +140,7 @@ export default function Heater() {
} else {
//if the heater was not carried from the heaters page, ie. page was reloaded, we will need to load the heater from the backend
heaterAPI
.getObjectHeater(heaterID)
.getObjectHeater(heaterID, as)
.then(resp => {
let h = ObjectHeater.any(resp.data.heater);
setHeater(h);
@ -192,7 +192,7 @@ export default function Heater() {
let deviceID = displayDevice.device?.settings?.deviceId;
if (deviceID) {
heaterAPI
.updateLink(heater.key, "objectHeater", deviceID.toString(), "device", [])
.updateLink(heater.key, "objectHeater", deviceID.toString(), "device", [], as)
.then(resp => {
if (deviceID) {
devices.delete(deviceID.toString());
@ -205,7 +205,7 @@ export default function Heater() {
let updatedHeater = heater;
updatedHeater.settings.mutations = [];
heaterAPI
.updateObjectHeater(heater.key, heater.name, updatedHeater.settings)
.updateObjectHeater(heater.key, heater.name, updatedHeater.settings, as)
.then(resp => {
setHeater(updatedHeater);
setDisplayedMutations([...updatedHeater.settings.mutations]);
@ -234,7 +234,7 @@ export default function Heater() {
"write",
"grant",
"revoke"
])
], as)
.then(resp => {
if (deviceID) {
devices.set(deviceID.toString(), dev);

View file

@ -155,7 +155,7 @@ export default function Heaters() {
"write",
"grant",
"revoke"
])
], as)
.then(resp => {
if (deviceID) {
devices.set(deviceID.toString(), dev);

View file

@ -178,7 +178,7 @@ export default function Site() {
"write",
"grant",
"revoke"
])
], as)
.then(resp => {
if (deviceID) {
devices.set(deviceID.toString(), dev);