12 lines
510 B
TypeScript
12 lines
510 B
TypeScript
import { ndmClient, type NdmSnmpLogPageQuery, type NdmSnmpLogResultVO, type PageParams, type PageResult } from '@/apis';
|
|
|
|
export const postSnmpLogPage = async (stationCode: string, pageQuery: PageParams<NdmSnmpLogPageQuery>) => {
|
|
const prefix = stationCode ? `/${stationCode}` : '';
|
|
const resp = await ndmClient.post<PageResult<NdmSnmpLogResultVO>>(`${prefix}/api/ndm/ndmSnmpLog/page`, pageQuery);
|
|
const [err, snmpLogData] = resp;
|
|
if (err || !snmpLogData) {
|
|
throw err;
|
|
}
|
|
return snmpLogData;
|
|
};
|