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
6 years ago
|
const express = require('express');
|
||
|
const router = express.Router();
|
||
6 years ago
|
const fs = require('fs-extra');
|
||
6 years ago
|
const _ = require('lodash');
|
||
6 years ago
|
var settings = [];
|
||
6 years ago
|
//--------------------------
|
||
|
// SETTINGS
|
||
|
//--------------------------
|
||
6 years ago
|
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');
|
||
|
}
|
||
6 years ago
|
});
|
||
6 years ago
|
module.exports = router;
|