Merge pull request #59 from resin-io/feature/app-create-feedback

Print feedback message after app create
This commit is contained in:
Juan Cruz Viotti 2015-06-02 17:08:44 -04:00
commit 2b80c7c91f
2 changed files with 11 additions and 2 deletions

View File

@ -46,7 +46,11 @@
return visuals.widgets.select('Select a type', deviceTypes, callback); return visuals.widgets.select('Select a type', deviceTypes, callback);
}); });
}, function(type, callback) { }, function(type, callback) {
return resin.models.application.create(params.name, type, callback); options.type = type;
return resin.models.application.create(params.name, options.type, callback);
}, function(applicationId, callback) {
console.info("Application created: " + params.name + " (" + options.type + ", id " + applicationId + ")");
return callback();
} }
], done); ], done);
} }

View File

@ -50,7 +50,12 @@ exports.create =
visuals.widgets.select('Select a type', deviceTypes, callback) visuals.widgets.select('Select a type', deviceTypes, callback)
(type, callback) -> (type, callback) ->
resin.models.application.create(params.name, type, callback) options.type = type
resin.models.application.create(params.name, options.type, callback)
(applicationId, callback) ->
console.info("Application created: #{params.name} (#{options.type}, id #{applicationId})")
return callback()
], done) ], done)