25-10-5/1
This commit is contained in:
@@ -123,6 +123,7 @@ class CRUD {
|
||||
|
||||
// 401 → دع الطبقة العليا تتعامل مع التجديد
|
||||
if (sc == 401) {
|
||||
await Get.put(LoginController()).getJWT();
|
||||
// لا تستدع getJWT هنا كي لا نضاعف الرحلات
|
||||
return 'token_expired';
|
||||
}
|
||||
@@ -190,6 +191,10 @@ class CRUD {
|
||||
'Bearer ${r(box.read(BoxName.jwt)).toString().split(Env.addd)[0]}'
|
||||
},
|
||||
);
|
||||
Log.print('response.body: ${response.body}');
|
||||
Log.print('response.request: ${response.request}');
|
||||
Log.print('response.payload: ${payload}');
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
var jsonData = jsonDecode(response.body);
|
||||
if (jsonData['status'] == 'success') {
|
||||
|
||||
Reference in New Issue
Block a user