Refactoring Room.ts to fetch map url automatically from ID

This commit is contained in:
David Négrier 2020-10-13 16:46:46 +02:00
parent 0580c692d1
commit aee06da7f9
7 changed files with 94 additions and 56 deletions

View file

@ -23,13 +23,6 @@ class UrlManager {
}
}
public getAnonymousMapUrlStart():string {
const match = /\/_\/global\/(.+)/.exec(window.location.pathname.toString())
if (!match) throw new Error('Could not extract startmap url from'+window.location.pathname);
return window.location.protocol+'//'+match[1];
}
public getOrganizationToken(): string|null {
const match = /\/register\/(.+)/.exec(window.location.pathname.toString());
return match ? match [1] : null;