add supported device check for web install fetch
This commit is contained in:
parent
37ef8d1502
commit
1636983d1f
@ -140,8 +140,13 @@ async function unlockBootloader(setProgress) {
|
||||
return "Bootloader unlocked.";
|
||||
}
|
||||
|
||||
const supportedDevices = ["redfin", "bramble", "sunfish", "coral", "flame", "bonito", "sargo", "crosshatch", "blueline"];
|
||||
|
||||
async function getLatestRelease() {
|
||||
let product = await device.getVariable("product");
|
||||
if (!supportedDevices.includes(product)) {
|
||||
throw new Error(`device model (${product}) is not supported by the GrapheneOS web installer`);
|
||||
}
|
||||
|
||||
let metadataResp = await fetch(`${RELEASES_URL}/${product}-stable`);
|
||||
let metadata = await metadataResp.text();
|
||||
|
Loading…
x
Reference in New Issue
Block a user