mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 11:10:11 +08:00
refactor: use SocketWrapper to wrap the instance
This commit is contained in:
1 parent
313d30edda
commit
5d9951a3a2
5 files changed
+75
-38
No files matched your search
@@ -7,6 +7,10 @@ class SessionManager {
|
||||
this.session = ref(null)
|
||||
}
|
||||
|
||||
getSession() {
|
||||
return this.session.value
|
||||
}
|
||||
|
||||
setSession(session) {
|
||||
console.log('Update session:', session)
|
||||
this.session.value = session
|
||||
@@ -50,6 +54,4 @@ class SessionManager {
|
||||
|
||||
const sessionManager = new SessionManager('helloworld')
|
||||
|
||||
sessionManager.lastOrCreate().catch(console.error)
|
||||
|
||||
export default sessionManager
|
||||
Reference in new issue
Block a user