Make OTA update live
This commit is contained in:
@ -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!,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user