mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Fix getAccount() response.
This commit is contained in:
parent
0127f8fb63
commit
2029a28d7b
@ -132,7 +132,7 @@ func (c *ApiController) GetAccount() {
|
||||
|
||||
username := c.GetSessionUser()
|
||||
userObj := object.GetUser(username)
|
||||
resp = Response{Status: "ok", Msg: "", Data: util.StructToJson(userObj)}
|
||||
resp = Response{Status: "ok", Msg: "", Data: userObj}
|
||||
|
||||
c.Data["json"] = resp
|
||||
c.ServeJSON()
|
||||
|
@ -105,16 +105,11 @@ class App extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
onLoggedIn() {
|
||||
this.getAccount();
|
||||
}
|
||||
|
||||
getAccount() {
|
||||
AuthBackend.getAccount()
|
||||
.then((res) => {
|
||||
const account = Setting.parseJson(res.data);
|
||||
this.setState({
|
||||
account: account,
|
||||
account: res.data,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user