aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--node_simple.js10
-rw-r--r--routes/user.js2
2 files changed, 6 insertions, 6 deletions
diff --git a/node_simple.js b/node_simple.js
index d9835a8..74a28db 100644
--- a/node_simple.js
+++ b/node_simple.js
@@ -557,31 +557,31 @@ exports.add_solution = function (fields, callback) {
comments: [],
author: fields[3]
};
- console.log("CHECK 1");
+
// establish a connection
mongoFactory.getConnection(uri)
.then(function(db) {
- console.log("CHECK 2");
+
// find the solutions table
var solutions = db.collection('solutions');
// insert data into table
solutions.insert(Data, function(err) {
if (err) callback(false , "Error: Failed to add the solution");
else {
- console.log("CHECK 3");
+
// console.log("solution added");
callback(true, "Success: added solution successfully!");
db.close(function (err) { // close the connection when done
if (err) throw err;
});
- console.log("CHECK 4");
+
}
});
})
.catch(function(err) {
console.error(err);
});
- console.log("CHECK 5");
+
};
diff --git a/routes/user.js b/routes/user.js
index ad25ef8..6ae0d80 100644
--- a/routes/user.js
+++ b/routes/user.js
@@ -91,7 +91,7 @@ router.post('/submit_solution/:examID/:qID', function(req,res){
//Redirect to solutions page again
res.redirect('/solutions/' + examID + '/' + qID);
- console.log("CHECK 7");
+
});
});