mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-25 08:21:04 +00:00
9 lines
266 B
CoffeeScript
9 lines
266 B
CoffeeScript
_ = require('lodash')
|
|
resin = require('../resin')
|
|
|
|
exports.isDeviceUUIDValid = (uuid, callback) ->
|
|
resin.models.device.getAll (error, devices) ->
|
|
return callback?(error) if error?
|
|
uuidExists = _.findWhere(devices, { uuid })?
|
|
return callback(null, uuidExists)
|