added world menu

This commit is contained in:
_Bastler
2021-09-28 09:44:11 +02:00
parent 8cc1584c2e
commit bb7f83cee6
7 changed files with 95 additions and 27 deletions
+15
View File
@@ -317,6 +317,21 @@ class ConnectionManager {
}
}
async getWorlds() {
const token = localUserStore.getAuthToken();
if (!token) {
throw "No token provided";
}
const { worlds } = await Axios.get(`${PUSHER_URL}/worlds`, { params: { token } }).then((res) => {
return res.data;
}
);
return worlds;
}
get currentRoom() {
return this._currentRoom;
}