summaryrefslogtreecommitdiff
path: root/mongo-edu.js
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2014-03-27 21:11:46 +0000
committerprzemyslawpluta <przemekpluta@hotmail.com>2014-03-27 21:11:46 +0000
commit858cf4041d8d5300d1c76a90a9d6f0b8d7954c38 (patch)
treee3b1a9106cc2705b5be00cff85951ebc20890a47 /mongo-edu.js
parenta0e8d0ec8aaab3b361a7d93c7eb5b1badaa2ab69 (diff)
downloadmongo-edu-858cf4041d8d5300d1c76a90a9d6f0b8d7954c38.zip
download handouts from syllabus table
Diffstat (limited to 'mongo-edu.js')
-rw-r--r--mongo-edu.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/mongo-edu.js b/mongo-edu.js
index e35640e..67a8676 100644
--- a/mongo-edu.js
+++ b/mongo-edu.js
@@ -40,7 +40,7 @@ exports.create = function start() {
}
}];
- mdbvideos.init(answers, function get(err, data) {
+ mdbvideos.init(answers, argv, function get(err, data) {
if (err !== null) { throw err; }
if (data.length) {
@@ -55,11 +55,13 @@ exports.create = function start() {
function currentList() {
inquirer.prompt(classes, function prompt(answers) {
- mdbvideos.getList(answers, argv, function get(err, data) {
+ mdbvideos.getList(answers, argv, function get(err, data, pass) {
if (err !== null) { throw err; }
if (data.length) {
+ if (pass) { return showDetails(err, data); }
+
list[0].message = 'Found ' + data.length + ' List'+ ((data.length > 1)? 's' : '') + '. Select:';
list[0].choices = data;
@@ -94,7 +96,7 @@ exports.create = function start() {
check[0].choices = data;
return inquirer.prompt(check, function prompt(answers) {
- videoHandler.download(answers, data);
+ videoHandler.download(answers, data, argv);
});
}