diff options
author | Ev Bogue <ev@evbogue.com> | 2019-09-07 15:39:14 -0500 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2019-09-07 15:39:14 -0500 |
commit | 275ea276e264ab16bfaa7f3d903a76bf3036a9d4 (patch) | |
tree | 1a3bfe427a3a33e0bd0b540290a36f7e6f3162a6 | |
parent | f5498fe3581548902a72c6b4943a9717079198f5 (diff) |
clean up
-rw-r--r-- | gossip.js | 3 | ||||
-rw-r--r-- | server.js | 6 |
2 files changed, 2 insertions, 7 deletions
@@ -85,10 +85,9 @@ function sync (subs, keys) { localforage.getItem(msg.author).then(feed => { open(feed[0]).then(lastmsg => { if (unboxedreq.length + lastmsg.seq === msg.seq) { - console.log('combinable feeds') var newlog = unboxedreq.concat(feed) localforage.setItem(msg.author, newlog).then(success => { - console.log('combined existing feed with diff and saved to client') + console.log('combined existing feed of ' + msg.author + ' with diff and saved to client') }) localforage.getItem('log').then(log => { if (!log) { @@ -106,16 +106,12 @@ bog.keys().then(key => { }) } if (msg.seq > unboxedreq.length) { fs.readFile(__dirname + '/bogs/' + msg.author, 'UTF-8', function (err, data) { - console.log('read existing feed from disk') var feed = JSON.parse(data) bog.open(feed[0]).then(lastmsg => { - console.log(msg.seq) - console.log(lastmsg.seq) if (unboxedreq.length + lastmsg.seq === msg.seq) { - console.log('combinable feeds') var newlog = unboxedreq.concat(feed) fs.writeFile(__dirname + '/bogs/' + msg.author, JSON.stringify(newlog), 'UTF-8', function (err, success) { - console.log('combined existing feed with diff and saved to server') + console.log('combined existing feed of ' + msg.author + ' with diff and saved to server') }) } }) |