separate sync for pull (implemented) and push (not yet)

This commit is contained in:
azivner
2017-10-26 20:31:31 -04:00
parent f6033705a7
commit 266727a21b
9 changed files with 116 additions and 73 deletions

View File

@@ -6,14 +6,14 @@ const auth = require('../../services/auth');
const sql = require('../../services/sql');
const migration = require('../../services/migration');
router.get('', auth.checkApiAuth, async (req, res, next) => {
router.get('', auth.checkApiAuthWithoutMigration, async (req, res, next) => {
res.send({
'db_version': parseInt(await sql.getOption('db_version')),
'app_db_version': migration.APP_DB_VERSION
});
});
router.post('', auth.checkApiAuth, async (req, res, next) => {
router.post('', auth.checkApiAuthWithoutMigration, async (req, res, next) => {
const migrations = await migration.migrate();
res.send({