fix page verify registration
This commit is contained in:
@@ -39,10 +39,10 @@ export const removeAuthHeaders = () => {
|
||||
delete axiosInstance.defaults.headers.Authorization
|
||||
}
|
||||
|
||||
async function Request(type: string, path: string, payload: any, setAuthToken?: boolean): Promise<Types.AxiosSuccess | Types.AxiosError> {
|
||||
async function Request(type: string, path: string, payload: any): Promise<Types.AxiosSuccess | Types.AxiosError> {
|
||||
let ricevuto = false
|
||||
try {
|
||||
// console.log(`Axios Request [${type}]:`, axiosInstance.defaults)
|
||||
console.log(`Axios Request [${type}]:`, axiosInstance.defaults, 'path:', path)
|
||||
let response: AxiosResponse
|
||||
if (type === 'post' || type === 'put' || type === 'patch') {
|
||||
response = await axiosInstance[type](path, payload, {
|
||||
@@ -52,7 +52,7 @@ async function Request(type: string, path: string, payload: any, setAuthToken?:
|
||||
}
|
||||
})
|
||||
ricevuto = true
|
||||
// console.log('Request Response: ', response)
|
||||
console.log('Request Response: ', response)
|
||||
// console.log(new Types.AxiosSuccess(response.data, response.status))
|
||||
|
||||
const setAuthToken = (path === '/updatepwd')
|
||||
@@ -109,7 +109,7 @@ async function Request(type: string, path: string, payload: any, setAuthToken?:
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
setTimeout(function () {
|
||||
setTimeout(() => {
|
||||
GlobalStore.state.connData.uploading_server = (GlobalStore.state.connData.uploading_server === 1) ? -1 : GlobalStore.state.connData.uploading_server
|
||||
GlobalStore.state.connData.downloading_server = (GlobalStore.state.connData.downloading_server === 1) ? -1 : GlobalStore.state.connData.downloading_server
|
||||
}, 1000)
|
||||
|
||||
Reference in New Issue
Block a user