Legt de bestaande wijzigingen in de hoofdworktree vast voordat de laatste worktree wordt gemerged.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
18 lines
281 B
JavaScript
18 lines
281 B
JavaScript
module.exports = function(req, res, next) {
|
|
|
|
|
|
if (!req.session.userId) {
|
|
|
|
if (req.originalUrl.startsWith("/api/")) {
|
|
return res.status(401).json({ error: "Je bent niet ingelogd" });
|
|
}
|
|
|
|
return res.redirect("/login");
|
|
|
|
}
|
|
|
|
|
|
next();
|
|
|
|
};
|