Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Rooms.vue
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | export default { | ||||
mounted() { | mounted() { | ||||
if (!this.$root.hasSKU('meet') || this.$root.isDegraded()) { | if (!this.$root.hasSKU('meet') || this.$root.isDegraded()) { | ||||
this.$root.errorPage(403) | this.$root.errorPage(403) | ||||
return | return | ||||
} | } | ||||
this.$root.startLoading() | this.$root.startLoading() | ||||
axios.get('/api/v4/openvidu/rooms') | axios.get('/api/v4/meet/rooms') | ||||
.then(response => { | .then(response => { | ||||
this.$root.stopLoading() | this.$root.stopLoading() | ||||
this.rooms = response.data.list | this.rooms = response.data.list | ||||
if (response.data.count) { | if (response.data.count) { | ||||
this.roomRoute = '/meet/' + encodeURI(this.rooms[0].name) | this.roomRoute = '/meet/' + encodeURI(this.rooms[0].name) | ||||
this.href = window.config['app.url'] + this.roomRoute | this.href = window.config['app.url'] + this.roomRoute | ||||
} | } | ||||
}) | }) | ||||
.catch(this.$root.errorHandler) | .catch(this.$root.errorHandler) | ||||
} | } | ||||
} | } | ||||
</script> | </script> |