export const checkLoggedIn = () => {
return new Promise((resolve, reject) => {
apiConfig.fetchApi('/users/is_valid', {}, 'get', {})
.then((resp)=> {
resolve(true);
})
.catch((exception)=> {
reject(false);
})
.done()
})
}
Above is my user token checking code.
But function checkLoggedIn()
is giving like the below image
But I want to get true or false only. Please if you find the issue in code, comment it out