Compare commits
No commits in common. "4dfe88a565a11067c14e573a1e49da2c28fdfbf8" and "0fd8dd0634467cd8499934f59aadb2532d6d2ffa" have entirely different histories.
4dfe88a565
...
0fd8dd0634
@ -281,11 +281,11 @@ async function apiGet(url, signal) {
|
|||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
redirect: 'follow'
|
redirect: 'follow'
|
||||||
});
|
});
|
||||||
const text = await res.text();
|
|
||||||
let data;
|
let data;
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(text);
|
data = await res.json();
|
||||||
} catch {
|
} catch {
|
||||||
|
const text = await res.text().catch(() => '');
|
||||||
throw new Error(`API-Antwort war kein JSON (HTTP ${res.status}): ${(text || '').slice(0, 200)}`);
|
throw new Error(`API-Antwort war kein JSON (HTTP ${res.status}): ${(text || '').slice(0, 200)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,12 +65,7 @@ async function fetchJson(url, signal) {
|
|||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
redirect: 'follow'
|
redirect: 'follow'
|
||||||
});
|
});
|
||||||
const text = await res.text();
|
return await res.json();
|
||||||
try {
|
|
||||||
return JSON.parse(text);
|
|
||||||
} catch {
|
|
||||||
throw new Error(`Update-Server Antwort war kein JSON (HTTP ${res.status}): ${text.slice(0, 200)}`);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
if (signal) signal.removeEventListener('abort', onAbort);
|
if (signal) signal.removeEventListener('abort', onAbort);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "multi-hoster-uploader",
|
"name": "multi-hoster-uploader",
|
||||||
"version": "2.3.9",
|
"version": "2.3.8",
|
||||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user