cloud: handle case where cloud token comes populated from desktop app with no server id.

This commit is contained in:
Koushik Dutta
2024-06-20 13:04:01 -07:00
parent 20101cda2e
commit d2b39e8fa3
3 changed files with 5 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/cloud",
"version": "0.2.14",
"version": "0.2.15",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/cloud",
"version": "0.2.14",
"version": "0.2.15",
"dependencies": {
"@eneris/push-receiver": "^3.1.5",
"@scrypted/common": "file:../../common",

View File

@@ -53,5 +53,5 @@
"@types/nat-upnp": "^1.1.5",
"@types/node": "^20.14.6"
},
"version": "0.2.14"
"version": "0.2.15"
}

View File

@@ -531,8 +531,9 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
throw new Error('@scrypted/cloud is not logged in.');
const q = qsstringify({
scope: local.pathname,
serverId: this.storageSettings.values.serverId,
ttl,
})
});
const scope = await httpFetch({
url: `https://${this.getHostname()}/_punch/scope?${q}`,
headers: {