2019-01-10 22:54:07 +01:00
|
|
|
const express = require('express');
|
|
|
|
const router = express.Router();
|
2019-02-27 17:17:51 +01:00
|
|
|
const fs = require('fs-extra');
|
2019-01-13 19:57:03 +01:00
|
|
|
const _ = require('lodash');
|
2019-01-12 20:07:08 +01:00
|
|
|
var settings = [];
|
2019-01-10 22:54:07 +01:00
|
|
|
//--------------------------
|
|
|
|
// SETTINGS
|
|
|
|
//--------------------------
|
2019-02-27 17:17:51 +01:00
|
|
|
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');
|
|
|
|
}
|
2019-01-10 22:54:07 +01:00
|
|
|
});
|
2019-02-27 17:17:51 +01:00
|
|
|
module.exports = router;
|