1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-23 07:14:21 +00:00

🔧 Add config parameter default value in useLoginAxios

This commit is contained in:
Steffo 2021-09-19 16:38:42 +02:00
parent 682b6deba8
commit d8687680a0
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -76,7 +76,7 @@ export function useLogin() {
}
export function useLoginAxios(config: AxiosRequestConfig) {
export function useLoginAxios(config: AxiosRequestConfig = {}) {
const instance = useInstance()
const {userData} = useLogin()
@ -101,7 +101,7 @@ export function useLoginAxios(config: AxiosRequestConfig) {
...config,
baseURL: instance.value,
headers: {
...config.headers,
...config?.headers,
authHeader,
}
})