mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-25 08:21:04 +00:00
21 lines
372 B
CoffeeScript
21 lines
372 B
CoffeeScript
Promise = require('bluebird')
|
|
canvas = require('./_canvas')
|
|
|
|
exports.getAll = ->
|
|
return canvas.get
|
|
resource: 'application'
|
|
options:
|
|
orderby: 'app_name asc'
|
|
expand: 'device'
|
|
|
|
exports.get = (id) ->
|
|
return canvas.get
|
|
resource: 'application'
|
|
id: id
|
|
|
|
.then (application) ->
|
|
if not application?
|
|
Promise.reject(new Error('Not found'))
|
|
|
|
return application
|