From 0a4b22c12eb48b9d20b9c7435eda3a46d5a71dc5 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 20 Mar 2023 01:27:47 +0100 Subject: [PATCH] Implemented connect/disconnect call on BluetoothService component. --- .../src/components/panels/Entities/BluetoothService.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/BluetoothService.vue b/platypush/backend/http/webapp/src/components/panels/Entities/BluetoothService.vue index d593454f..87fea8bf 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/BluetoothService.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/BluetoothService.vue @@ -14,7 +14,7 @@
@@ -37,9 +37,13 @@ export default { async connect(event) { event.stopPropagation() this.$emit('loading', true) + const method = ( + 'bluetooth.' + + (this.value.connected ? 'disconnect' : 'connect') + ) try { - await this.request('bluetooth.connect', { + await this.request(method, { device: this.parent.address, service_uuid: this.uuid, })