Skip to content

Commit

Permalink
amcrest: Fix probe
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Apr 13, 2024
1 parent 9c0d253 commit 9c9909e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/amcrest/src/probe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ export async function getDeviceInfo(credential: AuthFetchCredentialState, addres
vals[k] = v.trim();
}

return {
const ret = {
deviceType: vals.deviceType,
hardwareVersion: vals.hardwareVersion,
serialNumber: vals.serialNumber,
}
};

if (!ret.deviceType && !ret.hardwareVersion && !ret.serialNumber)
throw new Error('not amcrest');

return ret;
}

0 comments on commit 9c9909e

Please sign in to comment.