device settings: update existing ports

This commit is contained in:
Maxi Quoß
2023-01-30 09:53:27 +01:00
parent b0452aa82d
commit 647dfe3e9e

View File

@@ -41,7 +41,9 @@
if (!port.id) {
const result = await $pocketbase.collection('ports').create(port);
device.ports = [...device.ports, result.id];
return;
}
await $pocketbase.collection('ports').update(port.id, port);
}
// create or update device