added world menu
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user