- updated SendReq

- If Server Down the login msg error corrected.
This commit is contained in:
Paolo Arena
2019-02-07 00:53:10 +01:00
parent cb62d46048
commit 5ee0d8e171
8 changed files with 51 additions and 25 deletions

View File

@@ -79,19 +79,17 @@ export namespace ApiTool {
}
return reject(e)
}
return res.json()
.then((body) => {
return resolve({res, body})
})
.catch(e => {
UserStore.mutations.setServerCode(rescodes.ERR_GENERICO)
return reject(e)
})
} else {
return resolve({res, body: res.body})
}
return res.json()
.then((body) => {
return resolve({ res, body })
})
.catch(e => {
UserStore.mutations.setServerCode(rescodes.ERR_GENERICO)
return reject(e)
})
})
.catch(error => {
if (process.env.DEV) {