Skip to content

Commit f8c3371

Browse files
committed
The usage of isSuccess
1 parent 7df2590 commit f8c3371

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libraries/httpService/$api.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ export const $api = new HttpService({
77
Accept: 'application/json',
88
};
99
},
10+
isSuccess: (response) => {
11+
console.log(response.data);
12+
// if (response.data._id === 'react-native') {
13+
// return false;
14+
// }
15+
16+
return true;
17+
},
1018
onRespondError: (response: HttpResponse<{ error: string, reason: string }>, transform) => {
1119
if (response.data && response.data.reason) {
1220
transform.message = response.data.reason;

0 commit comments

Comments
 (0)