12 lines
550 B
TypeScript
12 lines
550 B
TypeScript
import { ndmClient, userClient, type Station } from '@/apis';
|
|
import { unwrapResponse } from '@/utils';
|
|
|
|
export const verifyApi = async (options?: { stationCode?: Station['code']; signal?: AbortSignal }) => {
|
|
const { stationCode, signal } = options ?? {};
|
|
const client = stationCode ? ndmClient : userClient;
|
|
const prefix = stationCode ? `/${stationCode}` : '';
|
|
const endpoint = `${prefix}/api/ndm/ndmKeepAlive/verify`;
|
|
const resp = await client.post<void>(endpoint, {}, { retRaw: true, timeout: 5000, signal });
|
|
unwrapResponse(resp);
|
|
};
|