feat: #7743 categories

This commit is contained in:
Barış Soner Uşaklı
2019-07-16 00:41:42 -04:00
parent 45223cded6
commit fcf3e0770b
13 changed files with 714 additions and 1230 deletions

View File

@@ -38,7 +38,9 @@ module.exports = function (db, module) {
return;
}
var query = { _key: { $in: keys } };
if (keys.length === 1) {
query._key = keys[0];
}
if (min !== '-inf') {
query.score = { $gte: parseFloat(min) };
}

View File

@@ -13,7 +13,7 @@ var PubSub = function () {
var subClient = db.connect();
this.pubClient = db.connect();
channelName = 'db:' + nconf.get('redis:database') + 'pubsub_channel';
channelName = 'db:' + nconf.get('redis:database') + ':pubsub_channel';
subClient.subscribe(channelName);
subClient.on('message', function (channel, message) {