mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
separated electron routing into separate file
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user