You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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;
|