mirror of
https://github.com/vladmandic/automatic
synced 2026-08-26 06:30:44 +02:00
@@ -24,9 +24,9 @@ async function authFetch(url, options = {}) {
|
||||
let res;
|
||||
try {
|
||||
res = await fetch(url, options);
|
||||
if (!res.ok) error('fetch', { status: res.status, url, user, token });
|
||||
if (!res.ok) error('fetch', { status: res?.status || 503, url, user, token });
|
||||
} catch (err) {
|
||||
error('fetch', { status: res.status, url, user, token, error: err });
|
||||
error('fetch', { status: res?.status || 503, url, user, token, error: err });
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ async function updateGPU() {
|
||||
const gpuEl = document.getElementById('gpu');
|
||||
const gpuTable = document.getElementById('gpu-table');
|
||||
try {
|
||||
const res = await authFetch(`${window.api}/gpu`);
|
||||
const res = await authFetch(`${window.api}/gpu-smi`);
|
||||
if (!res.ok) {
|
||||
clearInterval(gpuInterval);
|
||||
gpuEl.style.display = 'none';
|
||||
|
||||
Reference in New Issue
Block a user