Skip to content

Commit

Permalink
Merge pull request #99 from leejaeseong11/fix-room
Browse files Browse the repository at this point in the history
Fix room
  • Loading branch information
qbobl5 authored Dec 21, 2023
2 parents cd26011 + 695a8c9 commit 92e6301
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/components/code/Normal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,6 @@ export default {
}
this.socket.send(JSON.stringify(outMessage))
this.disconnect()
},
beforeDestroy() {
// 컴포넌트가 파괴되기전 이벤트 리스너 제거
window.removeEventListener('beforeunload', this.beforeUnloadHandler)
}
}
</script>
Expand Down
16 changes: 10 additions & 6 deletions src/views/room/WaitingRoom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export default {
this.socket.send(JSON.stringify(outMessage))
// this.socket.close()
}
if (this.roomStatus == 1) {
if (this.roomInfo.roomStatus == 1) {
SweetAlert.warning('방이 삭제되었습니다.').then((ok) => {
if (ok.isConfirmed) {
if (this.socket.readyState === WebSocket.OPEN) {
Expand Down Expand Up @@ -348,11 +348,15 @@ export default {
this.socket.send(JSON.stringify(talkMessage))
this.startButton = ''
const url = `${this.backURL}/room/${this.roomNo}`
apiClient.put(url, {
headers: {
'Content-Type': 'application/json'
}
})
apiClient
.put(url, {
headers: {
'Content-Type': 'application/json'
}
})
.then(() => {
this.roomInfo.roomStatus = 0
})
},
async roomOutButtonClickHandler() {
Expand Down

0 comments on commit 92e6301

Please sign in to comment.