fix save new ports

This commit is contained in:
Maxi Quoß
2023-01-30 13:13:09 +01:00
parent 288baf0217
commit 8c8671908c

View File

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