Logout in devel mode generates a new TeamID

This commit is contained in:
Neale Pickett 2023-09-15 16:13:09 -06:00
parent bb4859e7a9
commit 768600e48e
1 changed files with 3 additions and 8 deletions

View File

@ -10,12 +10,6 @@ class App {
this.server = new moth.Server(basePath)
let uuid = Math.floor(Math.random() * 1000000).toString(16)
this.fakeRegistration = {
TeamID: uuid,
TeamName: `Team ${uuid}`,
}
for (let form of document.querySelectorAll("form.login")) {
form.addEventListener("submit", event => this.handleLoginSubmit(event))
}
@ -103,9 +97,10 @@ class App {
}
if (this.state.DevelopmentMode() && !this.server.LoggedIn()) {
let teamID = Math.floor(Math.random() * 1000000).toString(16)
common.Toast("Automatically logging in to devel server")
console.info("Logging in with generated Team ID and Team Name", this.fakeRegistration)
return this.Login(this.fakeRegistration.TeamID, this.fakeRegistration.TeamName)
console.info(`Logging in with generated Team ID: ${teamID}`)
return this.Login(teamID, `Team ${teamID}`)
}
}