Commit ff19571c authored by andreagerino's avatar andreagerino

...

parent b1659b50
...@@ -29,6 +29,8 @@ router.get('/:resource_id', function(req, res, next) { ...@@ -29,6 +29,8 @@ router.get('/:resource_id', function(req, res, next) {
debug(err); debug(err);
next(err); next(err);
db.close();
}else{ }else{
var collection = db.collection('resources'); var collection = db.collection('resources');
...@@ -55,6 +57,8 @@ router.get('/:resource_id', function(req, res, next) { ...@@ -55,6 +57,8 @@ router.get('/:resource_id', function(req, res, next) {
} }
db.close();
}); });
} }
...@@ -72,6 +76,8 @@ router.post('/', function(req, res, next){ ...@@ -72,6 +76,8 @@ router.post('/', function(req, res, next){
debug(err); debug(err);
next(err); next(err);
db.close();
}else{ }else{
var collection = db.collection('resources'); var collection = db.collection('resources');
...@@ -104,6 +110,8 @@ router.post('/', function(req, res, next){ ...@@ -104,6 +110,8 @@ router.post('/', function(req, res, next){
debug(error); debug(error);
next(error); next(error);
db.close();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment