forked from projects/fipamo
24 lines
503 B
JavaScript
24 lines
503 B
JavaScript
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;
|