mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 22:23:07 +00:00
Implement device:identify command
This commit is contained in:
parent
982c18a900
commit
f56cd8162c
@ -2,6 +2,7 @@ deviceModel = require('../models/device')
|
||||
getDeviceDisplayName = require('../device/device').getDisplayName
|
||||
log = require('../log/log')
|
||||
table = require('../table/table')
|
||||
server = require('../server/server')
|
||||
widgets = require('../widgets/widgets')
|
||||
patterns = require('../patterns/patterns')
|
||||
authHooks = require('../hooks/auth')
|
||||
@ -29,3 +30,7 @@ exports.remove = authHooks.failIfNotLoggedIn (id, program) ->
|
||||
.catch(callback)
|
||||
, (error) ->
|
||||
throw error if error?
|
||||
|
||||
exports.identify = authHooks.failIfNotLoggedIn (uuid) ->
|
||||
server.post '/blink', { uuid }, (error) ->
|
||||
throw error if error?
|
||||
|
@ -64,6 +64,11 @@ program
|
||||
.description('Remove a device')
|
||||
.action(device.remove)
|
||||
|
||||
program
|
||||
.command('device:identify <uuid>')
|
||||
.description('Identify a device with a UUID')
|
||||
.action(device.identify)
|
||||
|
||||
# ---------- Preferences Module ----------
|
||||
preferences = require('./actions/preferences')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user