aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorWaref Haque <warefhaque@Warefs-MacBook-Pro.local>2016-07-19 23:21:20 +0000
committerWaref Haque <warefhaque@Warefs-MacBook-Pro.local>2016-07-19 23:21:20 +0000
commit5dccd5e1c80450375b1f32869d0a4f8d0c7689ba (patch)
tree1702e366b2ee2a141e6f6e4f85686149a9c848ba /routes
parentdaefddd8dc45e7044e83bd40706cfdca36471fe9 (diff)
added the id to exams passed
Diffstat (limited to 'routes')
-rw-r--r--routes/index.js15
1 files changed, 2 insertions, 13 deletions
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) {