forked from OpenWF/SpaceNinjaServer
		
	improve error message when registration failed
This commit is contained in:
		
							parent
							
								
									547f7cb61d
								
							
						
					
					
						commit
						88cbe96fa1
					
				@ -13,6 +13,7 @@ function doLogin() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function loginFromLocalStorage() {
 | 
					function loginFromLocalStorage() {
 | 
				
			||||||
 | 
					    const isRegister = registerSubmit;
 | 
				
			||||||
    doLoginRequest(
 | 
					    doLoginRequest(
 | 
				
			||||||
        data => {
 | 
					        data => {
 | 
				
			||||||
            if (single.getCurrentPath() == "/webui/") {
 | 
					            if (single.getCurrentPath() == "/webui/") {
 | 
				
			||||||
@ -28,7 +29,7 @@ function loginFromLocalStorage() {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        () => {
 | 
					        () => {
 | 
				
			||||||
            logout();
 | 
					            logout();
 | 
				
			||||||
            alert("Login failed");
 | 
					            alert(isRegister ? "Registration failed. Account already exists?" : "Login failed");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user