Open Diastro opened 12 years ago
When calling the API endpoint with a domain which isn't in the DB, it will create the DB but will leave it empty.
Ex : http://kepler.step.polymtl.ca:8089/API/visits/fakeDomain.org
Desired behaviour : If a request is made to a non-existant domain, drop the query.
Try to see if
db.open(function(err,db){ if(err) { logger.logRequest('error', "Error checking visitsCount for APIrequest (see Mongo logs, avail. connections?) " + request.hash, request); return; }
Has a return value when the db doesn't exits.
When calling the API endpoint with a domain which isn't in the DB, it will create the DB but will leave it empty.
Ex : http://kepler.step.polymtl.ca:8089/API/visits/fakeDomain.org
Desired behaviour : If a request is made to a non-existant domain, drop the query.
Try to see if
Has a return value when the db doesn't exits.