restore missing new install check

This commit is contained in:
matt wilkie
2024-11-24 21:50:34 -07:00
parent 18a682fd99
commit 1f282a5973

View File

@@ -14,7 +14,10 @@ import optionService from "./options.js";
const noAuthentication = config.General && config.General.noAuthentication === true;
function checkAuth(req: AppRequest, res: Response, next: NextFunction) {
if (!req.session.loggedIn && !utils.isElectron() && !noAuthentication) {
if (!sqlInit.isDbInitialized()) {
res.redirect("setup");
}
else if (!req.session.loggedIn && !utils.isElectron() && !noAuthentication) {
if (optionService.getOption('redirectBareDomain') === 'true') {
res.redirect('/share');
} else {