mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 14:13:07 +00:00
19 lines
475 B
CoffeeScript
19 lines
475 B
CoffeeScript
async = require('async')
|
|
permissions = require('../permissions/permissions')
|
|
errors = require('../errors/errors')
|
|
helpers = require('../helpers/helpers')
|
|
resin = require('resin-sdk')
|
|
|
|
exports.set = permissions.user (params, options) ->
|
|
async.waterfall([
|
|
|
|
(callback) ->
|
|
if not params.note?
|
|
return helpers.readStdin(callback)
|
|
return callback(null, params.note)
|
|
|
|
(note, callback) ->
|
|
resin.models.device.note(options.device, note, callback)
|
|
|
|
], errors.handle)
|