Update api.ts
This commit is contained in:
parent
6b9f6c6e3b
commit
d8f8730a74
@ -40,7 +40,7 @@ export default (i, endpoint, data = {}): Promise<{ [x: string]: any }> => {
|
|||||||
} else {
|
} else {
|
||||||
res.json().then(err => {
|
res.json().then(err => {
|
||||||
reject(err.error);
|
reject(err.error);
|
||||||
});
|
}, reject);
|
||||||
}
|
}
|
||||||
}).catch(reject);
|
}).catch(reject);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user