File tree 5 files changed +8
-9
lines changed
5 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ const envConfig = (MY_ENVIRONMENT) => {
2
2
if ( MY_ENVIRONMENT === 'production' ) {
3
3
return {
4
4
/* your production config */
5
- HOSTURL : 'https://jsonplaceholder2.typicode.com ' ,
5
+ HOSTURL : 'https://fakerestapi.azurewebsites.net ' ,
6
6
} ;
7
7
}
8
8
return {
9
- HOSTURL : 'https://jsonplaceholder.typicode.com ' ,
9
+ HOSTURL : 'https://fakerestapi.azurewebsites.net ' ,
10
10
} ;
11
11
} ;
12
12
Original file line number Diff line number Diff line change 1
1
{
2
2
"main" : " index.js" ,
3
- "version" : " 0.4.3 " ,
3
+ "version" : " 0.4.4 " ,
4
4
"scripts" : {
5
5
"android" : " react-native run-android" ,
6
6
"ios" : " react-native run-ios" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const Users = () => {
27
27
) : (
28
28
< View >
29
29
{ allUsersData ?. map ( ( item ) => (
30
- < Text key = { item . id } > { item ?. name } </ Text >
30
+ < Text key = { item . id } > { item ?. userName } </ Text >
31
31
) ) }
32
32
</ View >
33
33
) }
Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ export default {
8
8
`${ HOSTURL } /configuration/api/v1/configurations` ,
9
9
} ,
10
10
USERS : {
11
- GET_ALL_USERS_SERVICE : ( ) => `${ HOSTURL } /users ` ,
11
+ GET_ALL_USERS_SERVICE : ( ) => `${ HOSTURL } /api/v1/Users ` ,
12
12
} ,
13
13
} ;
Original file line number Diff line number Diff line change @@ -40,18 +40,17 @@ instanceAxios.interceptors.request.use(
40
40
instanceAxios . interceptors . response . use (
41
41
( response ) => response ,
42
42
( error ) => {
43
- const originalRequest = error . config ;
44
-
43
+ const originalRequest = error ?. config ;
45
44
if (
46
- error . response . status === 401 &&
45
+ error ? .response ? .status === 401 &&
47
46
originalRequest . url === 'http://13.232.130.60:8081/v1/auth/token'
48
47
) {
49
48
// router.push('/login');
50
49
return Promise . reject ( error ) ;
51
50
}
52
51
53
52
// eslint-disable-next-line no-underscore-dangle
54
- if ( error . response . status === 401 && ! originalRequest . _retry ) {
53
+ if ( error ? .response ? .status === 401 && ! originalRequest . _retry ) {
55
54
// eslint-disable-next-line no-underscore-dangle
56
55
originalRequest . _retry = true ;
57
56
const refreshToken = localStorageService . getRefreshToken ( ) ;
You can’t perform that action at this time.
0 commit comments