mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 12:43:09 -05:00
fix 'Out of sync' error
This commit is contained in:
11
app-sync.js
11
app-sync.js
@@ -139,9 +139,16 @@ app.post('/sync', async (req, res) => {
|
||||
for (let i = 0; i < newMessages.length; i++) {
|
||||
let msg = newMessages[i];
|
||||
let envelopePb = new SyncPb.MessageEnvelope();
|
||||
let messagePb = new SyncPb.Message();
|
||||
|
||||
messagePb.setDataset(msg.dataset);
|
||||
messagePb.setRow(msg.row);
|
||||
messagePb.setColumn(msg.column);
|
||||
messagePb.setValue(msg.value);
|
||||
|
||||
envelopePb.setTimestamp(msg.timestamp);
|
||||
envelopePb.setIsencrypted(msg.is_encrypted === 1);
|
||||
envelopePb.setContent(msg.content);
|
||||
envelopePb.setContent(messagePb.serializeBinary());
|
||||
|
||||
responsePb.addMessages(envelopePb);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ const sync = sequential(async function syncAPI(messages, since, fileId) {
|
||||
};
|
||||
});
|
||||
|
||||
let newMessages = actual.internal.syncAndReceiveMessages(messages, since);
|
||||
let newMessages = await actual.internal.syncAndReceiveMessages(messages, since);
|
||||
|
||||
return {
|
||||
trie: actual.internal.timestamp.getClock().merkle,
|
||||
|
||||
Reference in New Issue
Block a user