- Catalogo: qualità di stampa, margini. ora è 300 DPI.

This commit is contained in:
Surya Paolo
2024-12-05 14:13:19 +01:00
parent 1cb5e6f1ad
commit 5c20e75b6a
20 changed files with 359 additions and 51 deletions

View File

@@ -47,7 +47,7 @@ export const addAuthHeaders = () => {
// delete axiosInstance.defaults.headers.Authorization
//}
async function Request(type: string, path: string, payload: any): Promise<Types.AxiosSuccess | Types.AxiosError | undefined> {
async function Request(type: string, path: string, payload: any, responsedata?: any): Promise<Types.AxiosSuccess | Types.AxiosError | undefined> {
let ricevuto = false
const userStore = useUserStore()
@@ -65,6 +65,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
'x-auth': userStore.x_auth_token,
'x-refrtok': userStore.refreshToken,
},
...responsedata,
})
ricevuto = true
// console.log('Request Response: ', response)
@@ -119,10 +120,12 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
'x-auth': userStore.x_auth_token,
'x-refrtok': userStore.refreshToken,
},
...responsedata,
})
ricevuto = true
return new Types.AxiosSuccess(response.data, response.status)
} else if (type === 'postFormData') {
console.log('postFormData', payload)
response = await axiosInstance.post(path, payload, {
baseURL: globalStore.getServerHost(),
headers: {
@@ -130,6 +133,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
'x-auth': userStore.x_auth_token,
'x-refrtok': userStore.refreshToken,
},
...responsedata,
})
ricevuto = true
return new Types.AxiosSuccess(response.data, response.status)