Can delete an OTA update

This commit is contained in:
2024-10-08 22:22:57 +02:00
parent 2e4a2b68dd
commit eafa8e6a4b
5 changed files with 79 additions and 8 deletions

View File

@ -40,8 +40,18 @@ export class OTAAPI {
/**
* Get the link to download an OTA update
*/
static DownloadOTAUpdateURL(platform: string, version: string): string {
return APIClient.backendURL() + `/ota/${platform}/${version}`;
static DownloadOTAUpdateURL(update: OTAUpdate): string {
return APIClient.backendURL() + `/ota/${update.platform}/${update.version}`;
}
/**
* Delete an update
*/
static async DeleteUpdate(update: OTAUpdate): Promise<void> {
await APIClient.exec({
method: "DELETE",
uri: `/ota/${update.platform}/${update.version}`,
});
}
/**