chore: reorder import
This commit is contained in:
22
src/apis/requests/device/video/ndm-decoder.ts
Normal file
22
src/apis/requests/device/video/ndm-decoder.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import type { PageParams, NdmDecoderPageQuery, PageResult, NdmDecoderResultVO, NdmDecoderUpdateVO } from '@/apis/models';
|
||||
|
||||
export const postNdmDecoderPage = async (stationCode: string, pageQuery: PageParams<NdmDecoderPageQuery>) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.post<PageResult<NdmDecoderResultVO>>(`${prefix}/api/ndm/ndmDecoder/page`, pageQuery);
|
||||
const [err, ndmDecoderData] = resp;
|
||||
if (err || !ndmDecoderData) {
|
||||
throw err;
|
||||
}
|
||||
return ndmDecoderData;
|
||||
};
|
||||
|
||||
export const putNdmDecoder = async (stationCode: string, updateVO: NdmDecoderUpdateVO) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.put<NdmDecoderResultVO>(`${prefix}/api/ndm/ndmDecoder`, updateVO);
|
||||
const [err, ndmDecoder] = resp;
|
||||
if (err || !ndmDecoder) {
|
||||
throw err;
|
||||
}
|
||||
return ndmDecoder;
|
||||
};
|
||||
Reference in New Issue
Block a user