Make OTA update live

This commit is contained in:
2024-10-09 18:46:51 +02:00
parent 386f0439e4
commit e7190bab71
2 changed files with 52 additions and 2 deletions

View File

@ -65,4 +65,23 @@ export class OTAAPI {
})
).data;
}
/**
* Set desired version for one or mor devices
*/
static async SetDesiredVersion(
update: OTAUpdate,
all_devices: boolean,
devices?: string[]
): Promise<void> {
await APIClient.exec({
method: "POST",
uri: "/ota/set_desired_version",
jsonData: {
version: update.version,
platform: update.platform,
devices: all_devices ? undefined : devices!,
},
});
}
}