From 1fb9d41abb3724f947fe72e52bee752b813e99ac Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Mon, 26 Nov 2018 21:52:16 +1100 Subject: [PATCH] Cleaned a little bit of testing stuff. --- public/api/api.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/api/api.js b/public/api/api.js index fded761..88e88d3 100644 --- a/public/api/api.js +++ b/public/api/api.js @@ -42,7 +42,7 @@ export const get = async (url, params, test) => { if(process.env.NODE_ENV === 'development') { console.log('testing mode'); 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. - let res = await fetch(url, { - crossDomain:true - }); + let res = await fetch(url); if(res.status >= 400) throw new Error(`Server Responded with ${res.status}`); return await res.json(); };