diff --git a/public/shell.php b/public/shell.php index 9240f7b..dc1b246 100644 --- a/public/shell.php +++ b/public/shell.php @@ -123,7 +123,12 @@ } const res = await fetch(`${this.baseUrl}${path}`, { method, headers, body }); const data = await res.json(); - if (!res.ok) throw data; + if (!res.ok) { + if (res.status === 401) { + logout(); + } + throw data; + } return data; },