mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-21 04:04:07 +00:00
Add HTTP client wrapper and upgrade Axios to v1 (#594)
* refactor: add HTTP client wrapper and upgrade axios to v1 Introduce a thin HTTP wrapper (resources/scripts/http) that centralizes axios configuration, interceptors, and auth header injection. All 43 files now import from the wrapper instead of axios directly, making future library swaps a single-file change. Upgrade axios from 0.30.0 to 1.14.0. * fix: restore window.Ls assignment removed during axios refactor company.js uses window.Ls.set() to persist selected company, which broke after the axios plugin (that set window.Ls) was deleted.
This commit is contained in:
committed by
GitHub
parent
a38f09cf7b
commit
691178857f
@@ -673,7 +673,7 @@ import { useRoute } from 'vue-router'
|
||||
import { useDialogStore } from '@/scripts/stores/dialog'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import moment from 'moment'
|
||||
import axios from 'axios'
|
||||
import http from '@/scripts/http'
|
||||
import ModulePlaceholder from './partials/ModulePlaceholder.vue'
|
||||
import RecentModuleCard from './partials/RecentModuleCard.vue'
|
||||
import { useNotificationStore } from '@/scripts/stores/notification'
|
||||
@@ -853,7 +853,7 @@ async function installModule() {
|
||||
module: moduleData.value.module_name,
|
||||
}
|
||||
|
||||
let requestResponse = await axios.post(currentStep.stepUrl, updateParams)
|
||||
let requestResponse = await http.post(currentStep.stepUrl, updateParams)
|
||||
|
||||
currentStep.completed = true
|
||||
if (requestResponse.data) {
|
||||
|
||||
Reference in New Issue
Block a user