Display the list of ISO files

This commit is contained in:
2023-09-06 14:21:26 +02:00
parent e7d5747b99
commit 08b59b6f67
6 changed files with 152 additions and 7 deletions

View File

@ -1,5 +1,10 @@
import { APIClient } from "./ApiClient";
export interface IsoFile {
filename: string;
size: number;
}
export class IsoFilesApi {
/**
* Upload a new ISO file to the server
@ -29,4 +34,16 @@ export class IsoFilesApi {
jsonData: { url: url, filename: filename },
});
}
/**
* Get iso files list
*/
static async GetList(): Promise<IsoFile[]> {
return (
await APIClient.exec({
method: "GET",
uri: "/iso/list",
})
).data;
}
}