ui: update jwt with new pass
This commit is contained in:
parent
746d7a04eb
commit
8761f71bda
2 changed files with 5 additions and 2 deletions
|
|
@ -421,8 +421,11 @@ class UserStore {
|
|||
this.updatePasswordRequest = { loading: true, errors: [] };
|
||||
});
|
||||
try {
|
||||
await userService.updatePassword(params);
|
||||
const data = await userService.updatePassword(params) as { jwt: string, spotJwt: string, data: any };
|
||||
runInAction(() => {
|
||||
this.jwt = data.jwt;
|
||||
this.spotJwt = data.spotJwt;
|
||||
this.scopeState = data.data.scopeState;
|
||||
this.updatePasswordRequest = { loading: false, errors: [] };
|
||||
});
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ export default class UserService {
|
|||
return this.client
|
||||
.post('/account/password', data)
|
||||
.then((response: { json: () => any }) => response.json())
|
||||
.then((response: { data: any }) => response.data || {});
|
||||
.then((response: { data: any }) => response || {});
|
||||
}
|
||||
|
||||
fetchTenants() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue