Fix missing subdirectory support - Fixes #262

This commit is contained in:
Bubka
2023-12-29 00:21:52 +01:00
parent e3ded669ca
commit 5fd7f43968
4 changed files with 8 additions and 4 deletions

View File

@ -4,11 +4,12 @@ import { useNotifyStore } from '@/stores/notify'
export const httpClientFactory = (endpoint = 'api') => {
let baseURL
const subdir = window.appConfig.subdirectory
if (endpoint === 'web') {
baseURL = '/'
baseURL = subdir + '/'
} else {
baseURL = '/api/v1'
baseURL = subdir + '/api/v1'
}
const httpClient = axios.create({