diff options
author | przemyslawpluta <przemekpluta@hotmail.com> | 2014-02-17 19:09:02 +0000 |
---|---|---|
committer | przemyslawpluta <przemekpluta@hotmail.com> | 2014-02-17 19:09:02 +0000 |
commit | da6cd89321af91524f51dd2ea9b959738505cba4 (patch) | |
tree | 18e4d022a3eb9377d445818c1db00360222b499a | |
parent | c9c95c52d4265f0bd8925946f43668a2d07cc41d (diff) | |
download | mongo-edu-da6cd89321af91524f51dd2ea9b959738505cba4.zip |
cater for other courses
-rw-r--r-- | lib/login.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/login.js b/lib/login.js index c28c334..694b2a5 100644 --- a/lib/login.js +++ b/lib/login.js @@ -113,7 +113,7 @@ module.exports = { if (current.text().indexOf('Video') !== -1) { list.push(current.attr('href')); } }); - getCourses = _.filter(list, function map(item) { return (item.indexOf('wiki/M101') !== -1); }); + getCourses = _.filter(list, function map(item) { return item.match(/(wiki\/M101|wiki\/M102|wiki\/C100|wiki\/M202)/); }); callback(null, _.map(getCourses, function map(item) { return { name: item.replace(tag, '').slice(0, -1).slice(1).replace(/-/g, ' ').replace(/\//g, ': '), value: item }; })); } |