mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
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,9 +173,13 @@ axiosClient.interceptors.response.use(
|
||||||
const serverId = useAuthStore.getState().currentServer?.id;
|
const serverId = useAuthStore.getState().currentServer?.id;
|
||||||
|
|
||||||
if (serverId) {
|
if (serverId) {
|
||||||
useAuthStore.getState().actions.updateServer(serverId, {
|
const headerCredential = response.headers['x-nd-authorization'] as string | undefined;
|
||||||
ndCredential: response.headers['x-nd-authorization'] as string,
|
|
||||||
});
|
if (headerCredential) {
|
||||||
|
useAuthStore.getState().actions.updateServer(serverId, {
|
||||||
|
ndCredential: headerCredential,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue