akf-forum/middlewares/user.js

6 lines
163 B
JavaScript
Raw Normal View History

2022-04-06 21:14:46 +03:00
const { User } = require("../classes");
module.exports = async (req, res, next) => {
req.user = await new User().getById(req.session.userid);
next();
}