13 lines
534 B
TypeScript
13 lines
534 B
TypeScript
import { ndmClient } from '@/apis/client';
|
|
import type { PageParams, NdmIcmpLogPageQuery, PageResult, NdmIcmpLogResultVO } from '@/apis/models';
|
|
|
|
export const postIcmpLogPage = async (stationCode: string, pageQuery: PageParams<NdmIcmpLogPageQuery>) => {
|
|
const prefix = stationCode ? `/${stationCode}` : '';
|
|
const resp = await ndmClient.post<PageResult<NdmIcmpLogResultVO>>(`${prefix}/api/ndm/ndmIcmpLog/page`, pageQuery);
|
|
const [err, icmpLogData] = resp;
|
|
if (err || !icmpLogData) {
|
|
throw err;
|
|
}
|
|
return icmpLogData;
|
|
};
|