2 diff test

This commit is contained in:
Barış Soner Uşaklı
2018-05-26 13:50:31 -04:00
parent fc56347c22
commit 4504bbae52
2 changed files with 21 additions and 1 deletions

View File

@@ -23,7 +23,9 @@ Diffs.exists = function (pid, callback) {
Diffs.get = function (pid, since, callback) {
async.waterfall([
async.apply(db.getListRange.bind(db), 'post:' + pid + ':diffs', 0, -1),
function (next) {
Diffs.list(pid, next);
},
function (timestamps, next) {
// Pass those made after `since`, and create keys
const keys = timestamps.filter(function (timestamp) {