Skip to content
Snippets Groups Projects
Commit e166c40d authored by Mcintosh, Liam S (UG - Computer Science)'s avatar Mcintosh, Liam S (UG - Computer Science)
Browse files

Merge branch 'master' of https://gitlab.eps.surrey.ac.uk/nlp11/coursework -m merge

parents ffbb7750 408c933f
No related branches found
No related tags found
No related merge requests found
...@@ -52,8 +52,6 @@ app.post('/predict', (req,res) => { ...@@ -52,8 +52,6 @@ app.post('/predict', (req,res) => {
// Insert the record to the collection, throw error if insert unsuccessful // Insert the record to the collection, throw error if insert unsuccessful
collection.insert(rec, {w:1}, function(err, result) {}); collection.insert(rec, {w:1}, function(err, result) {});
}, function(){
db.close();
}); });
res.render('predictions',{predictions:JSON.parse(JSON.parse(body).predictionText)}) res.render('predictions',{predictions:JSON.parse(JSON.parse(body).predictionText)})
...@@ -74,7 +72,6 @@ app.get('/submissions', function (req, res) { ...@@ -74,7 +72,6 @@ app.get('/submissions', function (req, res) {
cursor.forEach(function(doc, err){ cursor.forEach(function(doc, err){
resultArray.push(doc) resultArray.push(doc)
}, function(){ }, function(){
db.close();
res.render('submissions', {items: resultArray}); res.render('submissions', {items: resultArray});
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment