Skip to content
Snippets Groups Projects
Commit f404d93b authored by Hermann's avatar Hermann
Browse files

remove timeout in requests

parent c85e2443
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,6 @@ export function resetSession() { ...@@ -27,7 +27,6 @@ export function resetSession() {
const amivapi = axios.create({ const amivapi = axios.create({
baseURL: apiUrl, baseURL: apiUrl,
timeout: 10000,
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
}); });
...@@ -35,12 +34,8 @@ function checkToken(token) { ...@@ -35,12 +34,8 @@ function checkToken(token) {
// check if a token is still valid // check if a token is still valid
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
amivapi.get('users', { amivapi.get('users', {
headers: { headers: { 'Content-Type': 'application/json', Authorization: token },
'Content-Type': 'application/json',
Authorization: token,
},
}).then((response) => { }).then((response) => {
console.log(response.data);
if (response.status === 200) resolve(); if (response.status === 200) resolve();
else reject(); else reject();
}).catch(reject); }).catch(reject);
...@@ -74,7 +69,6 @@ export function getSession() { ...@@ -74,7 +69,6 @@ export function getSession() {
checkAuthenticated().then(() => { checkAuthenticated().then(() => {
const authenticatedSession = axios.create({ const authenticatedSession = axios.create({
baseURL: apiUrl, baseURL: apiUrl,
timeout: 10000,
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Authorization: APISession.token, Authorization: APISession.token,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment