aboutsummaryrefslogtreecommitdiff
path: root/routes/index.js
diff options
context:
space:
mode:
authorkumar <kumar.damani@mail.utoronto.ca>2016-07-24 06:00:23 +0000
committerkumar <kumar.damani@mail.utoronto.ca>2016-07-24 06:00:23 +0000
commite83ad0a7931611822f49f84bf21a204df1de8eb6 (patch)
treefab19a339d4419404c2d69f2f5a5e90bc6e711da /routes/index.js
parenta4cadfb98def3ac6aaee3bb5a166fb0fd7072211 (diff)
parentc7c6495993e29d1d51defcad6925274e9efa0bc8 (diff)
pull y
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'routes/index.js')
-rw-r--r--routes/index.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/routes/index.js b/routes/index.js
index 6d5fdac..961a60d 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -11,7 +11,7 @@ var bcrypt = require('bcrypt-nodejs');
/* Render/GET homepage. */
router.get('/', function(req, res, next) {
- addFirstAdmin();
+ //addFirstAdmin();
res.render('index');
req.session.errors = null;
req.session.success = null;
@@ -75,7 +75,6 @@ router.get('/exams/:id', function(req, res, next) {
minExamInfoArray.push(minExamInfo);
}
}
- console.log(minExamInfoArray);
res.render('exams', {query: req.params.id, result: minExamInfoArray});
});
});
@@ -137,9 +136,6 @@ router.get('/questions/:exam_id', function (req,res) {
};
res.render('questions', {query: qList, examInfo: examInfo});
});
-
-
- console.log(exam);
});
/*dbFile.get_exam_info_by_ID(examID, function (questions) {
@@ -193,7 +189,6 @@ router.get('/solutions/:exam_id/:q_num', function (req, res) {
soln.commentCount = soln.comments.length;
});
res.render('user_solutions', {query: solutions, examID: examID, qID: qID});
- console.log(solutions);
});
});
@@ -204,11 +199,11 @@ router.post('/add_solutions/submit', function (req, res) {
/**** Helpers ****/
function addFirstAdmin() {
- console.log("Inside addFirstAdmin()");
+ //console.log("Inside addFirstAdmin()");
//admin_data = {fname: firstname, lname: lastname, username: username, password: password}
var password = 'lamptable';
var hash_pwd = passport_file.encryptPassword(password);
- console.log("Admin hashed: " + hash_pwd);
+ //console.log("Admin hashed: " + hash_pwd);
var admin_data = {
fname: 'Admin',
lname: 'Admin',