Pair device right away to prevent errors on prd update operations
This commit is contained in:
parent
80dc42bbe6
commit
e320cfa193
@ -366,15 +366,14 @@ export class Server {
|
||||
if (!processId || !stateId) {
|
||||
throw new Error('Failed to get process id or state id');
|
||||
}
|
||||
// now pair the device before continuing
|
||||
service.pairDevice(processId, [service.getDeviceAddress()]);
|
||||
await service.handleApiReturn(pairingResult);
|
||||
const udpateResult = await service.createPrdUpdate(processId, stateId);
|
||||
await service.handleApiReturn(udpateResult);
|
||||
const approveResult = await service.approveChange(processId, stateId);
|
||||
await service.handleApiReturn(approveResult);
|
||||
|
||||
// now pair the device
|
||||
service.pairDevice(processId, [service.getDeviceAddress()]);
|
||||
|
||||
// Update the device in the database
|
||||
const device = service.dumpDeviceFromMemory();
|
||||
if (device) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user