🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 02:12
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user