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

@@ -4,10 +4,12 @@ const build = require('./build');
const packageJson = require('../../package');
const APP_DB_VERSION = 99;
const SYNC_VERSION = 1;
module.exports = {
appVersion: packageJson.version,
dbVersion: APP_DB_VERSION,
syncVersion: SYNC_VERSION,
buildDate: build.buildDate,
buildRevision: build.buildRevision
};

View File

@@ -69,7 +69,7 @@ async function login() {
const resp = await syncRequest(syncContext, 'POST', '/api/login/sync', {
timestamp: timestamp,
dbVersion: appInfo.dbVersion,
syncVersion: appInfo.syncVersion,
hash: hash
});