mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
__comty_shared_state session.destroy
emit
This commit is contained in:
parent
90fba41279
commit
8e534f6b7e
@ -82,7 +82,7 @@ export default class Session {
|
||||
|
||||
Session.removeToken()
|
||||
|
||||
__comty_shared_state.emit("session.destroyed")
|
||||
__comty_shared_state.eventBus.emit("session.destroyed")
|
||||
|
||||
return response.data
|
||||
}
|
||||
@ -101,7 +101,19 @@ export default class Session {
|
||||
|
||||
Session.removeToken()
|
||||
|
||||
__comty_shared_state.emit("session.destroyed")
|
||||
__comty_shared_state.eventBus.emit("session.destroyed")
|
||||
|
||||
return response.data
|
||||
}
|
||||
|
||||
static validSession = async (token) => {
|
||||
const response = await request({
|
||||
method: "POST",
|
||||
url: "/session/validate",
|
||||
data: {
|
||||
token: token
|
||||
}
|
||||
})
|
||||
|
||||
return response.data
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user