RADOM JAZDA
This commit is contained in:
parent
97b411e0c5
commit
6d7613c5ff
1 changed files with 4 additions and 4 deletions
|
@ -55,7 +55,7 @@ class ApiClient {
|
||||||
headers: headers(forGet: true),
|
headers: headers(forGet: true),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.statusCode == 401 || response.statusCode == 403) {
|
if (response.statusCode == 401) {
|
||||||
await refresh();
|
await refresh();
|
||||||
return await get(path);
|
return await get(path);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ class ApiClient {
|
||||||
headers: headers(forLogin: forLogin),
|
headers: headers(forLogin: forLogin),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.statusCode == 401 || response.statusCode == 403) {
|
if (response.statusCode == 401) {
|
||||||
await refresh();
|
await refresh();
|
||||||
return await post(path, body, forLogin: forLogin);
|
return await post(path, body, forLogin: forLogin);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ class ApiClient {
|
||||||
headers: headers(),
|
headers: headers(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.statusCode == 401 || response.statusCode == 403) {
|
if (response.statusCode == 401) {
|
||||||
await refresh();
|
await refresh();
|
||||||
return await delete(path);
|
return await delete(path);
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ class ApiClient {
|
||||||
headers: headers(),
|
headers: headers(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.statusCode == 401 || response.statusCode == 403) {
|
if (response.statusCode == 401) {
|
||||||
await refresh();
|
await refresh();
|
||||||
return await patch(path, body);
|
return await patch(path, body);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue