diff --git a/app-sync.js b/app-sync.js index 7e2e012..c07ff91 100644 --- a/app-sync.js +++ b/app-sync.js @@ -126,7 +126,7 @@ app.post('/sync', async (req, res) => { // encode it back... let responsePb = new SyncPb.SyncResponse(); responsePb.setMerkle(JSON.stringify(trie)); - newMessages.forEach(msg => responsePb.addMessages(msg)); + newMessages.forEach((msg) => responsePb.addMessages(msg)); res.set('Content-Type', 'application/actual-sync'); res.send(Buffer.from(responsePb.serializeBinary())); @@ -368,7 +368,7 @@ app.get('/list-user-files', (req, res) => { res.send( JSON.stringify({ status: 'ok', - data: rows.map(row => ({ + data: rows.map((row) => ({ deleted: row.deleted, fileId: row.id, groupId: row.group_id, diff --git a/sync-simple.js b/sync-simple.js index e76e328..a88f188 100644 --- a/sync-simple.js +++ b/sync-simple.js @@ -57,7 +57,7 @@ function addMessages(db, messages) { return returnValue; } -function getMerkle(db, group_id) { +function getMerkle(db) { let rows = db.all('SELECT * FROM messages_merkles'); if (rows.length > 0) { @@ -84,7 +84,7 @@ function sync(messages, since, groupId) { return { trie, - newMessages: newMessages.map(msg => { + newMessages: newMessages.map((msg) => { const envelopePb = new SyncPb.MessageEnvelope(); envelopePb.setTimestamp(msg.timestamp); envelopePb.setIsencrypted(msg.is_encrypted);