mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 13:47:52 +00:00
Don't compute device type slug as the logic is implicit on the SDK
This commit is contained in:
parent
f36e13658f
commit
0753bd1fe9
@ -19,12 +19,7 @@ exports.create = permissions.user (params, options) ->
|
|||||||
ui.widgets.select('Select a type', deviceTypes, callback)
|
ui.widgets.select('Select a type', deviceTypes, callback)
|
||||||
|
|
||||||
(type, callback) ->
|
(type, callback) ->
|
||||||
|
resin.models.application.create(params.name, type, callback)
|
||||||
# TODO: Currently returns 'unknown' if device is not recognised.
|
|
||||||
# Maybe we should break or handle better?
|
|
||||||
slugifiedType = resin.models.device.getDeviceSlug(type)
|
|
||||||
|
|
||||||
resin.models.application.create(params.name, slugifiedType, callback)
|
|
||||||
|
|
||||||
], errors.handle
|
], errors.handle
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user