probably fine with 8 digit codes
This commit is contained in:
parent
ddcb341ef9
commit
247f5c7268
@ -17,7 +17,7 @@ export class HomeComponent {
|
|||||||
async new() {
|
async new() {
|
||||||
let mapCode: string;
|
let mapCode: string;
|
||||||
do {
|
do {
|
||||||
mapCode = Array(16).fill(0).map(() => chars[Math.round(Math.random() * chars.length)]).join('');
|
mapCode = Array(8).fill(0).map(() => chars[Math.round(Math.random() * chars.length)]).join('');
|
||||||
} while (await this.syncService.exists(mapCode));
|
} while (await this.syncService.exists(mapCode));
|
||||||
return this.router.navigate(['/', mapCode]);
|
return this.router.navigate(['/', mapCode]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user