public static setHeader(): void {
ApiService.vueInstance.axios.defaults.headers.common[
"Authorization"
] = `Bearer ${JwtService.getToken()}`;
ApiService.vueInstance.axios.defaults.headers.common["Accept"] =
"application/json";
}
error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'axios')
Hi,
Thank you for reaching out to us,
Unfortunately, we weren't able to reproduce this in the latest Metronic version.
Please make sure that you have initialized ApiService in /src/main.ts and vue-axios use line is still in the init function.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
thanks,problem solved
Hi,
Glad to hear that. All the best with your project!
Regards,
Lauris Stepanovs,
Keenthemes Support Team