From 5dccd5e1c80450375b1f32869d0a4f8d0c7689ba Mon Sep 17 00:00:00 2001 From: Waref Haque Date: Tue, 19 Jul 2016 19:21:20 -0400 Subject: added the id to exams passed --- .idea/workspace.xml | 167 ++++++++++++++++++++++++++++++++++++++++++++-------- routes/index.js | 15 +---- 2 files changed, 145 insertions(+), 37 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a15a1d8..98b079d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,7 @@ - + @@ -24,31 +24,41 @@ - + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + @@ -62,8 +72,8 @@ @@ -154,6 +164,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + true + + bdd + + DIRECTORY + + false + + - @@ -198,18 +285,18 @@ + - + + - - @@ -220,10 +307,10 @@ - + - - + + @@ -236,10 +323,42 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/routes/index.js b/routes/index.js index 1406143..72e6c5b 100644 --- a/routes/index.js +++ b/routes/index.js @@ -59,7 +59,8 @@ router.get('/exams/:id', function(req, res, next) { term:toProperCase(exams[i].term), instructors:exams[i].instructors, type:toProperCase(exams[i].type) + " Examination", - title:exams[i].title + title:exams[i].title, + id:exams[i]._id }; //console.log(minExamInfo); minExamInfoArray.push(minExamInfo); @@ -91,18 +92,6 @@ app.get('/exams.html', function (req,res) { res.sendFile(__dirname+'/exams.html'); });*/ - -function getExamsForCourseCode(courseCode) { - dbFile.get_all_exams(courseCode, function (exams) { - if (exams.length == 0){ - console.log("Nothing was found"); - } - else { - console.log(exams); - } - }); -} - module.exports = router; function toProperCase(string) { -- cgit v1.2.3