mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added session_uuid
& getAllSessions
method
This commit is contained in:
parent
1c7e7ef601
commit
4303d4a2e7
@ -21,6 +21,10 @@ export default class Session {
|
|||||||
return this.decodedToken()?.user_id
|
return this.decodedToken()?.user_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get session_uuid() {
|
||||||
|
return this.decodedToken()?.session_uuid
|
||||||
|
}
|
||||||
|
|
||||||
static delToken() {
|
static delToken() {
|
||||||
return cookies.remove(Session.tokenKey)
|
return cookies.remove(Session.tokenKey)
|
||||||
}
|
}
|
||||||
@ -31,6 +35,10 @@ export default class Session {
|
|||||||
return token && jwt_decode(token)
|
return token && jwt_decode(token)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async getAllSessions() {
|
||||||
|
return await Session.bridge.get.sessions()
|
||||||
|
}
|
||||||
|
|
||||||
//* BASIC HANDLERS
|
//* BASIC HANDLERS
|
||||||
login = (payload, callback) => {
|
login = (payload, callback) => {
|
||||||
const body = {
|
const body = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user