cloud: watch for no login before sending a request to the server

This commit is contained in:
Koushik Dutta
2022-03-25 13:00:48 -07:00
parent d680034c8a
commit d04f08ccf4
3 changed files with 5 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/cloud",
"version": "0.0.29",
"version": "0.0.30",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/cloud",
"version": "0.0.29",
"version": "0.0.30",
"dependencies": {
"axios": "^0.25.0",
"bpmux": "^8.1.3",

View File

@@ -44,5 +44,5 @@
"@types/debug": "^4.1.5",
"@types/http-proxy": "^1.17.5"
},
"version": "0.0.29"
"version": "0.0.30"
}

View File

@@ -60,6 +60,8 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
}
const token_info = this.storage.getItem('token_info');
if (!token_info)
throw new Error('@scrypted/cloud is not logged in.');
const q = qs.stringify({
scope: local.path,
ttl,