fipamo/brain/routes/dash/nav.js

24 lines
503 B
JavaScript
Raw Normal View History

const express = require('express');
const router = express.Router();
const fs = require('fs-extra');
const _ = require('lodash');
var settings = [];
//--------------------------
// SETTINGS
//--------------------------
router.get('/', function(req, res) {
fs.readJson('config/site-settings.json')
.then(obj => {
settings = [];
settings = obj;
})
.catch(() => {
//console.error(err)
});
if (req.session.user) {
} else {
res.redirect('/@/dashboard');
}
});
module.exports = router;