🔧 إعادة كتابة shell.php بالكامل — Vanilla JS بدون Alpine.js
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* مُصادَق — API Client with JWT Auth & Refresh Flow
|
||||
*/
|
||||
const API = {
|
||||
baseUrl: '/api/v1',
|
||||
baseUrl: '/Application/public/api.php',
|
||||
accessToken: localStorage.getItem('access_token'),
|
||||
|
||||
async get(path) {
|
||||
@@ -39,7 +39,6 @@ const API = {
|
||||
});
|
||||
|
||||
if (response.status === 401) {
|
||||
// Try refresh token
|
||||
const refreshed = await this.refreshToken();
|
||||
if (refreshed) {
|
||||
return this._request(method, path, body, isFormData);
|
||||
@@ -72,5 +71,3 @@ const API = {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export default API;
|
||||
|
||||
Reference in New Issue
Block a user