Wrong connection.

This commit is contained in:
Samuel Clay 2020-12-17 14:08:02 -05:00
parent 7938fb589d
commit 74997ff554
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ do ->
feed_id = parseInt(req.params[0], 10)
etag = req.header('If-None-Match')
log.debug "Feed: #{feed_id} " + if etag then " / #{etag}" else ""
@collection.findOne _id: feed_id, (err, docs) ->
collection.findOne _id: feed_id, (err, docs) ->
if not err and etag and docs and docs?.color == etag
log.debug "Cached: #{feed_id}, etag: #{etag}/#{docs?.color} " + if err then "(err: #{err})" else ""
res.sendStatus 304

View file

@ -56,7 +56,7 @@
feed_id = parseInt(req.params[0], 10);
etag = req.header('If-None-Match');
log.debug(`Feed: ${feed_id} ` + (etag ? ` / ${etag}` : ""));
return this.collection.findOne({
return collection.findOne({
_id: feed_id
}, function(err, docs) {
var body;