Refactor server list to object instead of array

- Improve performance due to frequency of accessing the list
This commit is contained in:
jeffvli 2023-05-09 00:39:11 -07:00
parent 3dfeed1432
commit b2db2b27da
4 changed files with 22 additions and 14 deletions

View file

@ -192,8 +192,8 @@ axiosClient.interceptors.response.use(
const serverId = currentServer.id;
const token = currentServer.ndCredential;
console.log(`token is expired: ${token}`);
useAuthStore.getState().actions.setCurrentServer(null);
useAuthStore.getState().actions.updateServer(serverId, { ndCredential: undefined });
useAuthStore.getState().actions.setCurrentServer(null);
}
}