refactor: add getOrCreateSession to simplify process

This commit is contained in:
wancat authored and Annie Huang committed 2023-11-12 21:23:12 +08:00
1 parent 610894e6d8
commit 801d1aa07b
6 files changed
+72 -32

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ const completed = computed(() => {
})
onMounted(async () => {
await sessionManager.lastOrCreate()
await sessionManager.getActiveSession()
socket.connect(sessionManager.getSession())
socket.on('connect', function open() {
console.log('Connected to the server.')