mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	Merge pull request #1286 from TriliumNext/fix_views_appPath_#1285
fix: EJS crash after failed login
This commit is contained in:
		
						commit
						43b1b8a306
					
				@ -13,16 +13,16 @@ import type { Request, Response } from "express";
 | 
				
			|||||||
function loginPage(req: Request, res: Response) {
 | 
					function loginPage(req: Request, res: Response) {
 | 
				
			||||||
    res.render("login", {
 | 
					    res.render("login", {
 | 
				
			||||||
        failedAuth: false,
 | 
					        failedAuth: false,
 | 
				
			||||||
        assetPath: assetPath,
 | 
					        assetPath,
 | 
				
			||||||
        appPath: appPath
 | 
					        appPath
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function setPasswordPage(req: Request, res: Response) {
 | 
					function setPasswordPage(req: Request, res: Response) {
 | 
				
			||||||
    res.render("set_password", {
 | 
					    res.render("set_password", {
 | 
				
			||||||
        error: false,
 | 
					        error: false,
 | 
				
			||||||
        assetPath: assetPath,
 | 
					        assetPath,
 | 
				
			||||||
        appPath: appPath
 | 
					        appPath
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -46,7 +46,8 @@ function setPassword(req: Request, res: Response) {
 | 
				
			|||||||
    if (error) {
 | 
					    if (error) {
 | 
				
			||||||
        res.render("set_password", {
 | 
					        res.render("set_password", {
 | 
				
			||||||
            error,
 | 
					            error,
 | 
				
			||||||
            assetPath: assetPath
 | 
					            assetPath,
 | 
				
			||||||
 | 
					            appPath
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -65,7 +66,8 @@ function login(req: Request, res: Response) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        return res.status(401).render("login", {
 | 
					        return res.status(401).render("login", {
 | 
				
			||||||
            failedAuth: true,
 | 
					            failedAuth: true,
 | 
				
			||||||
            assetPath: assetPath
 | 
					            assetPath,
 | 
				
			||||||
 | 
					            appPath
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user