Fix report button on anonymous connection
This commit is contained in:
parent
92137dc0a3
commit
fd3b8dda2c
2 changed files with 14 additions and 1 deletions
|
@ -12,12 +12,14 @@ const URL_ROOM_STARTED = '/Floor0/floor0.json';
|
|||
class ConnectionManager {
|
||||
private localUser!:LocalUser;
|
||||
|
||||
private connexionType?: GameConnexionTypes
|
||||
/**
|
||||
* Tries to login to the node server and return the starting map url to be loaded
|
||||
*/
|
||||
public async initGameConnexion(): Promise<Room> {
|
||||
|
||||
const connexionType = urlManager.getGameConnexionType();
|
||||
this.connexionType = connexionType;
|
||||
if(connexionType === GameConnexionTypes.register) {
|
||||
const organizationMemberToken = urlManager.getOrganizationToken();
|
||||
const data = await Axios.post(`${API_URL}/register`, {organizationMemberToken}).then(res => res.data);
|
||||
|
@ -108,6 +110,10 @@ class ConnectionManager {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
get getConnexionType(){
|
||||
return this.connexionType;
|
||||
}
|
||||
}
|
||||
|
||||
export const connectionManager = new ConnectionManager();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue