diff options
| author | HumairAK <humair88@hotmail.com> | 2016-07-21 06:24:24 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-07-21 06:24:24 +0000 |
| commit | 2549ee68e435b77e7e07d3ea95363268cbfe9164 (patch) | |
| tree | 8f48f6447a4377f1bc15ae7d73dbab3337044720 /routes | |
| parent | d694c1a73f77def42c17b58027f046bf9e1af809 (diff) | |
Added other dependencies for authentication, made minor adjustments to index.js, added templating for exams, will remove dependencie modules later, keep for now
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/index.js b/routes/index.js index 16f5778..ff7de10 100644 --- a/routes/index.js +++ b/routes/index.js @@ -59,10 +59,11 @@ router.get('/exams/:id', function(req, res, next) { //console.log(exams); //only pass over the information that is necessary for the exams page for (var i = 0; i<exams.length;i++){ + var getInstructors = exams[i].instructors.join(", "); var minExamInfo = { courseCode:exams[i].course_code, year:exams[i].year, term:toProperCase(exams[i].term), - instructors:exams[i].instructors, + instructors: getInstructors, type:toProperCase(exams[i].type) + " Examination", title:exams[i].title, id:exams[i]._id @@ -72,7 +73,7 @@ router.get('/exams/:id', function(req, res, next) { } } console.log(minExamInfoArray); - res.render('exams', {query: minExamInfoArray}); + res.render('exams', {query: req.params.id, result: minExamInfoArray}); }); }); |
