alive returns boolean

This commit is contained in:
casperlamboo 2016-04-16 18:05:35 +02:00
parent f5f406c93d
commit e35b68bd8f
1 changed files with 8 additions and 2 deletions

View File

@ -45,7 +45,13 @@ export default class {
return rest.get(`${this.api}network/signin`);
}
alive () {
return rest.get(`${this.api}network/alive`);
async alive () {
try {
await rest.get(`${this.api}network/alive`);
return true;
} catch(error) {
return false;
}
}
}