move API routes into api subdir

This commit is contained in:
azivner
2017-10-15 17:09:41 -04:00
parent 597a9063e5
commit e8655a84e2
9 changed files with 32 additions and 32 deletions

View File

@@ -0,0 +1,12 @@
const express = require('express');
const router = express.Router();
const sql = require('../../sql');
const auth = require('../../auth');
router.get('/', auth.checkApiAuth, async (req, res, next) => {
const recentChanges = await sql.getResults("select * from notes_history order by date_modified desc limit 1000");
res.send(recentChanges);
});
module.exports = router;