Avoid setting ?to=/

That's the default so it's extra visual noise.
This commit is contained in:
Asher
2020-11-10 18:14:18 -06:00
parent b8340a2ae9
commit 71850e312b
3 changed files with 7 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ router.all("*", (req, res, next) => {
}
// Redirect all other pages to the login.
return redirect(req, res, "login", {
to: req.path,
to: req.path !== "/" ? req.path : undefined,
})
}