akf-forum/routes/get/userEdit.js

9 lines
248 B
JavaScript
Raw Normal View History

const { User } = require("../../classes/index");
module.exports = (req, res) => {
if (!req.session.loggedin) return res.redirect('/login');
const user = new User().getId(req.session.userid);
res.render("userEdit", { user })
}