neutral-old/routes/signout.js
2023-02-22 13:57:27 +01:00

31 lines
517 B
JavaScript

var express = require('express');
var router = express.Router();
var path = require("path")
var fs = require("fs")
var CryptoJS = require("crypto-js");
var uuid = require("uuid")
var ntr = require("../neutral-functions.js")
/* GET home page. */
router.get('/', function(req, res, next) {
var check = ntr.checkToken(req, res)
if(check.name == false) {
res.redirect(302, "/login")
} else {
res.clearCookie('tokenID')
res.redirect(302, "/login")
}
});
module.exports = router;