Rewrite http utils; properly handle (& retry on) network errors

This commit is contained in:
Vendicated
2024-03-12 02:31:46 +01:00
parent 132adcb733
commit 97267ef89a
3 changed files with 54 additions and 40 deletions

View File

@@ -81,7 +81,7 @@ export async function checkUpdates() {
try {
const raw = await githubGet("/repos/Vencord/Vesktop/releases/latest");
const data = JSON.parse(raw.toString("utf-8")) as ReleaseData;
const data: ReleaseData = await raw.json();
const oldVersion = app.getVersion();
const newVersion = data.tag_name.replace(/^v/, "");