mirror of
https://github.com/franjsco/tick3t
synced 2025-06-05 22:19:18 +02:00
improvement: remove httpClient
This commit is contained in:
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
export const httpClient = (url, options) => {
|
|
||||||
return fetch(url, options)
|
|
||||||
.then(response => {
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(response.status);
|
|
||||||
}
|
|
||||||
|
|
||||||
return response.json();
|
|
||||||
}).catch(err => {
|
|
||||||
throw new Error(err);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user