auth changes

This commit is contained in:
azivner
2017-12-23 09:57:20 -05:00
parent 215c3a414f
commit c07c18f08a
9 changed files with 22 additions and 17 deletions

View File

@@ -7,8 +7,9 @@ const sql = require('../../services/sql');
const data_dir = require('../../services/data_dir');
const utils = require('../../services/utils');
const sync_table = require('../../services/sync_table');
const auth = require('../../services/auth');
router.get('/:directory/to/:parentNoteId', async (req, res, next) => {
router.get('/:directory/to/:parentNoteId', auth.checkApiAuth, async (req, res, next) => {
const directory = req.params.directory.replace(/[^0-9a-zA-Z_-]/gi, '');
const parentNoteId = req.params.parentNoteId;