From 05a558420cb0a3af73246c4217644f338ea0bced Mon Sep 17 00:00:00 2001 From: sentriz Date: Thu, 7 Dec 2023 00:48:58 +0000 Subject: [PATCH] fix(ui): fix manual import --- betanin_client/src/backend.js | 1 + betanin_client/src/components/ManualImport.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/betanin_client/src/backend.js b/betanin_client/src/backend.js index 49cd284..dbb3b88 100644 --- a/betanin_client/src/backend.js +++ b/betanin_client/src/backend.js @@ -13,6 +13,7 @@ const baseAxios = { } const insecureAxios = axios.create(baseAxios) + const secureAxios = axios.create(baseAxios) secureAxios.interceptors.request.use((config) => { config.headers['Authorization'] = `Bearer ${authUtils.getToken()}` diff --git a/betanin_client/src/components/ManualImport.vue b/betanin_client/src/components/ManualImport.vue index f12a322..7b541ed 100644 --- a/betanin_client/src/components/ManualImport.vue +++ b/betanin_client/src/components/ManualImport.vue @@ -35,7 +35,7 @@ export default { const formData = new FormData() formData.append('both', this.selection) try { - await backend.secureAxios.post(fetchUrl, formData) + await backend.secureAxios.post(fetchUrl, formData, { headers: { 'Content-Type': '' } }) } catch (error) { Toast.open({ message: `error importing: ${error.response.data.message}`,