backup is now triggered after start of the app and with timer

This commit is contained in:
azivner
2017-10-28 12:23:11 -04:00
parent 94a0f3e041
commit c5f80051ae
3 changed files with 13 additions and 8 deletions

View File

@@ -4,12 +4,9 @@ const express = require('express');
const router = express.Router();
const sql = require('../../services/sql');
const utils = require('../../services/utils');
const backup = require('../../services/backup');
const auth = require('../../services/auth');
router.get('/', auth.checkApiAuth, async (req, res, next) => {
await backup.regularBackup();
const notes = await sql.getResults("select "
+ "notes_tree.*, "
+ "COALESCE(clone.note_title, notes.note_title) as note_title, "