Display the list of OTA updates in the frontend

This commit is contained in:
2024-10-08 21:53:21 +02:00
parent 2924d14281
commit 6cf7c2cae1
8 changed files with 113 additions and 5 deletions

View File

@ -1,5 +1,11 @@
import { APIClient } from "./ApiClient";
export interface OTAUpdate {
platform: string;
version: string;
file_size: number;
}
export class OTAAPI {
/**
* Get the list of supported OTA platforms
@ -30,4 +36,16 @@ export class OTAAPI {
formData: fd,
});
}
/**
* Get the list of OTA updates
*/
static async ListOTAUpdates(): Promise<OTAUpdate[]> {
return (
await APIClient.exec({
method: "GET",
uri: "/ota",
})
).data;
}
}