neutral-old/routes/index.js
2023-02-21 12:02:37 +01:00

25 lines
532 B
JavaScript

var express = require('express');
var router = express.Router();
var ntr = require("../neutral-functions.js")
/* GET home page. */
router.get('/', function(req, res, next) {
var check = ntr.checkToken(req, res)
if(check == false) {
res.redirect(302, "/login")
} else {
res.render('index', { title: ntr.getFullName(check), username: ntr.getFullName(check), accountpic: '<img width="200" class="w-25 sidebar-image noside" src="images/userspics/' + check + '.png">' });
}
});
module.exports = router;