Fix ND potentially setting undefined undefined credential (#60)
This commit is contained in:
parent
0103a84358
commit
76805a0b19
1 changed files with 7 additions and 3 deletions
|
@ -173,10 +173,14 @@ axiosClient.interceptors.response.use(
|
|||
const serverId = useAuthStore.getState().currentServer?.id;
|
||||
|
||||
if (serverId) {
|
||||
const headerCredential = response.headers['x-nd-authorization'] as string | undefined;
|
||||
|
||||
if (headerCredential) {
|
||||
useAuthStore.getState().actions.updateServer(serverId, {
|
||||
ndCredential: response.headers['x-nd-authorization'] as string,
|
||||
ndCredential: headerCredential,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
},
|
||||
|
|
Reference in a new issue