🔧 إعادة كتابة shell.php بالكامل — Vanilla JS بدون Alpine.js

This commit is contained in:
Hamza-Ayed
2026-05-03 01:22:54 +03:00
parent 3ced45c9cd
commit 6373f7572f
2 changed files with 185 additions and 145 deletions

View File

@@ -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;