RADOM JAZDA

This commit is contained in:
doman 2023-08-27 00:03:50 +02:00
parent 97b411e0c5
commit 6d7613c5ff

View file

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