mirror of
https://github.com/ragestudio/comty.git
synced 2025-07-08 08:44:15 +00:00
Add handleUserDataUpdate method to AuthManager
This commit is contained in:
parent
f3690b3376
commit
752f2ee269
@ -70,6 +70,11 @@ export default class AuthManager {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleUserDataUpdate = (data) => {
|
||||||
|
this.state.user = data
|
||||||
|
app.eventBus.emit("self:user:update", data)
|
||||||
|
}
|
||||||
|
|
||||||
initialize = async () => {
|
initialize = async () => {
|
||||||
const token = await SessionModel.token
|
const token = await SessionModel.token
|
||||||
|
|
||||||
@ -87,6 +92,8 @@ export default class AuthManager {
|
|||||||
|
|
||||||
app.userData = user
|
app.userData = user
|
||||||
this.state.user = user
|
this.state.user = user
|
||||||
|
|
||||||
|
return user
|
||||||
}
|
}
|
||||||
|
|
||||||
flush = async () => {
|
flush = async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user