Introduced separate sync version (previously DB version was used to check sync compatibility), closes #120

This commit is contained in:
azivner
2018-06-10 15:55:29 -04:00
parent 14c704d6db
commit d67246699a
5 changed files with 12 additions and 6 deletions

View File

@@ -21,10 +21,10 @@ async function loginSync(req) {
return [400, { message: 'Auth request time is out of sync' }];
}
const dbVersion = req.body.dbVersion;
const syncVersion = req.body.syncVersion;
if (dbVersion !== appInfo.dbVersion) {
return [400, { message: 'Non-matching db versions, local is version ' + appInfo.dbVersion }];
if (syncVersion !== appInfo.syncVersion) {
return [400, { message: 'Non-matching sync versions, local is version ' + appInfo.syncVersion }];
}
const documentSecret = await options.getOption('documentSecret');