feat: super admin use sakai
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
import axios from 'axios'
|
||||
import { getApiBaseURL } from './tenant'
|
||||
import { toFriendlyApiError } from '@shared/apiError'
|
||||
|
||||
export const api = axios.create({
|
||||
baseURL: getApiBaseURL(),
|
||||
})
|
||||
|
||||
api.interceptors.response.use(
|
||||
(resp) => resp,
|
||||
(err) => {
|
||||
const fe = toFriendlyApiError(err)
|
||||
const wrapped = new Error(fe.detail || fe.summary)
|
||||
;(wrapped as any).friendly = fe
|
||||
;(wrapped as any).cause = err
|
||||
throw wrapped
|
||||
},
|
||||
)
|
||||
|
||||
@@ -13,6 +13,5 @@
|
||||
"strict": true,
|
||||
"types": ["vite/client"]
|
||||
},
|
||||
"include": ["src"]
|
||||
"include": ["src", "../shared"]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'node:path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
base: './',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@shared': path.resolve(__dirname, '../shared'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
fs: { allow: ['..'] },
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user