diff --git a/src/apis/request/biz/other/ndm-switch.ts b/src/apis/request/biz/other/ndm-switch.ts index 0ea79ba..9e39491 100644 --- a/src/apis/request/biz/other/ndm-switch.ts +++ b/src/apis/request/biz/other/ndm-switch.ts @@ -14,7 +14,7 @@ import { unwrapResponse } from '@/utils'; export const pageSwitchApi = async (pageQuery: PageParams, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/page`; const resp = await client.post>(endpoint, pageQuery, { signal }); @@ -24,7 +24,7 @@ export const pageSwitchApi = async (pageQuery: PageParams, o export const detailSwitchApi = async (id: string, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/detail`; const resp = await client.get(endpoint, { params: { id }, signal }); @@ -34,7 +34,7 @@ export const detailSwitchApi = async (id: string, options?: { stationCode?: Stat export const saveSwitchApi = async (saveVO: NdmSwitchSaveVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch`; const resp = await client.post(endpoint, saveVO, { signal }); @@ -44,7 +44,7 @@ export const saveSwitchApi = async (saveVO: NdmSwitchSaveVO, options?: { station export const updateSwitchApi = async (updateVO: NdmSwitchUpdateVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch`; const resp = await client.put(endpoint, updateVO, { signal }); @@ -54,7 +54,7 @@ export const updateSwitchApi = async (updateVO: NdmSwitchUpdateVO, options?: { s export const deleteSwitchApi = async (ids: string[], options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch`; const resp = await client.delete(endpoint, ids, { signal }); @@ -64,7 +64,7 @@ export const deleteSwitchApi = async (ids: string[], options?: { stationCode?: S export const exportSwitchApi = async (pageQuery: PageParams, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/defaultExportByTemplate`; const resp = await client.post(endpoint, pageQuery, { responseType: 'blob', retRaw: true, signal }); @@ -86,7 +86,7 @@ export const importSwitchApi = async (file: File, options?: { stationCode?: Stat export const probeSwitchApi = async (ids: string[], options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/probeByIds`; const resp = await client.post(endpoint, ids, { signal });