modularize redirect function

This commit is contained in:
2022-12-18 21:52:39 -08:00
parent 42ebaff402
commit 5dc35cbbf3
4 changed files with 17 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ function init (){
status.innerText = "Authenticating...";
let ticket = await requestTicket(formData.get("username"), formData.get("password"));
setTicket(ticket.data.ticket, ticket.data.CSRFPreventionToken);
window.location.href = "index.html";
goToPage("https://client.tronnet.net/index.html");
}
catch (error) {
if(error instanceof ResponseError) { // response error is usually 401 auth failed