webhook: fix 404 hang

This commit is contained in:
Koushik Dutta
2021-11-12 11:18:41 -08:00
parent 9d31773432
commit 5194bed5c4
3 changed files with 6 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/webhook",
"version": "0.0.10",
"version": "0.0.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/webhook",
"version": "0.0.10",
"version": "0.0.11",
"dependencies": {
"@types/node": "^16.6.1"
},

View File

@@ -33,5 +33,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.0.10"
"version": "0.0.11"
}

View File

@@ -27,7 +27,6 @@ class WebhookMixin extends SettingsMixinDeviceBase<Settings> {
}
async putMixinSetting(key: string, value: string | number | boolean): Promise<void> {
this.storage.setItem(key, value.toString());
this.onDeviceEvent(ScryptedInterface.Settings, undefined);
let token = this.storage.getItem('token');
@@ -135,6 +134,9 @@ class WebhookMixin extends SettingsMixinDeviceBase<Settings> {
}
else {
this.console.error('Unknown method or property', methodOrProperty);
response.send('Not Found', {
code: 404,
})
}
}
}