summaryrefslogtreecommitdiff
path: root/lib/validate.js
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2014-09-28 18:36:08 +0100
committerprzemyslawpluta <przemekpluta@hotmail.com>2014-09-28 18:36:08 +0100
commit75245d62fdd7230ac3bdb634f26ad0da8826f61f (patch)
treed9156924b6d80fdbf024652ae4184fd5fd37bcfe /lib/validate.js
parent50b4cf93765ad4a74672baa12f8d59772356aad9 (diff)
downloadmongo-edu-75245d62fdd7230ac3bdb634f26ad0da8826f61f.zip
cleanup
Diffstat (limited to 'lib/validate.js')
-rw-r--r--lib/validate.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/validate.js b/lib/validate.js
index c6909d6..d0b5e9e 100644
--- a/lib/validate.js
+++ b/lib/validate.js
@@ -6,22 +6,14 @@
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
-var mkdirp = require('mkdirp');
+var mkdirp = require('mkdirp'),
+ prompts = require('./prompts');
module.exports.init = function init(opt, callback) {
'use strict';
- var profile = [
- { type: 'input', name: 'user', message: 'MongoDB Uni User Name', default: '', validate: function(value) {
- if (value !== '') { return true; }
- return 'Please enter your MongoDB Uni user name - email address';
- }},
- { type: 'password', message: 'MongoDB Uni Password', name: 'password', validate: function(value) {
- if (value !== '') { return true; }
- return 'Please enter your MongoDB Uni password';
- }}
- ];
+ var profile = prompts.profile;
if (opt.u !== '') { profile[0].default = opt.u; }