getRooms(){ axios.get(`${API_BASE_URL}private/rooms`,{'headers' :{ 'Authorization': 'Bearer '+localStorage.getItem('idToken'), }}).then(resp => { this.fetched =true if(resp.status === 200){ this.rooms = resp.data; console.log("rooms", this.rooms); if (this.rooms.length > 0) { //update chatview by first user console.log("update chatview by first room", this.rooms[0]); this.firstRoom = this.rooms[0]; } } }).catch((err) => { console.log("coming in error", err); this.$router.push('/login'); }); }