Cleaned a little bit of testing stuff.
This commit is contained in:
@ -42,7 +42,7 @@ export const get = async (url, params, test) => {
|
|||||||
if(process.env.NODE_ENV === 'development') {
|
if(process.env.NODE_ENV === 'development') {
|
||||||
console.log('testing mode');
|
console.log('testing mode');
|
||||||
return await new Promise((resolve,reject) => {
|
return await new Promise((resolve,reject) => {
|
||||||
//setTimeout(e => resolve(test), 1000);
|
setTimeout(e => resolve(test), 1000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,9 +56,7 @@ export const get = async (url, params, test) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Now make our fetch request.
|
//Now make our fetch request.
|
||||||
let res = await fetch(url, {
|
let res = await fetch(url);
|
||||||
crossDomain:true
|
|
||||||
});
|
|
||||||
if(res.status >= 400) throw new Error(`Server Responded with ${res.status}`);
|
if(res.status >= 400) throw new Error(`Server Responded with ${res.status}`);
|
||||||
return await res.json();
|
return await res.json();
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user