Fix the "error" bug #103
@ -41,7 +41,8 @@ async function _rest(endPoint, config){
|
|||||||
pending: config['pending'] != null ? config['pending'] : 'pending',
|
pending: config['pending'] != null ? config['pending'] : 'pending',
|
||||||
error: config['error'] != null ? config['error'] : 'Network Failure...',
|
error: config['error'] != null ? config['error'] : 'Network Failure...',
|
||||||
success: config['success'] != null ? config['success'] : {render(res){
|
success: config['success'] != null ? config['success'] : {render(res){
|
||||||
return res.ok ? "Success" : "error";
|
console.log(res);
|
||||||
|
return res.data.ok ? "Success" : "error";
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
.then( e => e.json()).catch( e => e );
|
.then( e => e.json()).catch( e => e );
|
||||||
|
Loading…
Reference in New Issue
Block a user