ui: update jwt with new pass

This commit is contained in:
nick-delirium 2024-11-15 15:50:27 +01:00
parent 746d7a04eb
commit 8761f71bda
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 5 additions and 2 deletions

View file

@ -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;

View file

@ -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() {