feat: super admin use sakai

This commit is contained in:
2025-12-17 11:48:53 +08:00
parent f2b53967eb
commit 1a16b0290f
137 changed files with 29250 additions and 3412 deletions

View File

@@ -1,8 +1,19 @@
import axios from 'axios'
import { getApiBaseURL } from './tenant'
import { toFriendlyApiError } from '@shared/apiError'
export const api = axios.create({
baseURL: getApiBaseURL(),
withCredentials: true,
})
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
},
)