separated electron routing into separate file

This commit is contained in:
azivner
2017-11-30 20:51:35 -05:00
parent 7bdf269095
commit 471821ebe5
6 changed files with 46 additions and 41 deletions

View File

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