mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 13:20:41 +03:00
7 lines
No EOL
246 B
JavaScript
7 lines
No EOL
246 B
JavaScript
const { UserModel } = require("../models");
|
|
|
|
module.exports = async (req, res, next) => {
|
|
res.error = (type, error) => res.status(type).render("error", { type, error });
|
|
req.user = await UserModel.get(req.session.userid);
|
|
next();
|
|
}
|