Display the list of OTA updates in the frontend
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user