added document_secret as basis for API authentication

This commit is contained in:
azivner
2017-10-28 19:55:55 -04:00
parent 724f4b43b7
commit eb6f9f8f81
7 changed files with 57 additions and 24 deletions

18
routes/api/login.js Normal file
View File

@@ -0,0 +1,18 @@
"use strict";
const express = require('express');
const router = express.Router();
const auth = require('../../services/auth');
const sql = require('../../services/sql');
const migration = require('../../services/migration');
router.post('', async (req, res, next) => {
res.send({
'db_version': parseInt(await sql.getOption('db_version')),
'app_db_version': migration.APP_DB_VERSION
});
});
module.exports = router;