mirror of
https://github.com/koush/scrypted.git
synced 2026-02-08 16:29:57 +00:00
cloud: watch for no login before sending a request to the server
This commit is contained in:
4
plugins/cloud/package-lock.json
generated
4
plugins/cloud/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -44,5 +44,5 @@
|
||||
"@types/debug": "^4.1.5",
|
||||
"@types/http-proxy": "^1.17.5"
|
||||
},
|
||||
"version": "0.0.29"
|
||||
"version": "0.0.30"
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user