Use visuals.widgets.select for app create command

This commit is contained in:
Juan Cruz Viotti 2015-02-11 10:07:53 -04:00
parent a6a3eeae6d
commit d97a4d9d49

View File

@ -34,7 +34,10 @@ exports.create =
(callback) ->
return callback(null, options.type) if options.type?
visuals.patterns.selectDeviceType(callback)
resin.models.device.getSupportedDeviceTypes (error, deviceTypes) ->
return callback(error) if error?
visuals.widgets.select('Select a type', deviceTypes, callback)
(type, callback) ->
resin.models.application.create(params.name, type, callback)