@@ -150,6 +150,7 @@ cache.sub('station.voteSkipSong', stationId => {
});
cache.sub('station.remove', stationId => {
+ utils.emitToRoom(`station.${stationId}`, 'event:stations.remove');
utils.emitToRoom('admin.stations', 'event:admin.station.removed', stationId);
@@ -158,7 +158,6 @@
let _this = this;
this.socket.emit('stations.remove', this.editing._id, res => {
Toast.methods.addToast(res.message, 8000);
- if (res.status === 'success' && _this.$parent.station) location.href = '/';
}
},
@@ -500,6 +500,10 @@
_this.resumeLocalStation();
+ _this.socket.on('event:stations.remove', () => {
+ location.href = '/';
+ });
+
_this.socket.on('event:song.like', data => {
if (!this.noSong) {
if (data.songId === _this.currentSong.songId) {