chore: reorder import
This commit is contained in:
22
src/apis/requests/device/video/ndm-camera.ts
Normal file
22
src/apis/requests/device/video/ndm-camera.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import type { PageParams, NdmCameraPageQuery, PageResult, NdmCameraResultVO, NdmCameraUpdateVO } from '@/apis/models';
|
||||
|
||||
export const postNdmCameraPage = async (stationCode: string, pageQuery: PageParams<NdmCameraPageQuery>) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.post<PageResult<NdmCameraResultVO>>(`${prefix}/api/ndm/ndmCamera/page`, pageQuery);
|
||||
const [err, ndmCameraData] = resp;
|
||||
if (err || !ndmCameraData) {
|
||||
throw err;
|
||||
}
|
||||
return ndmCameraData;
|
||||
};
|
||||
|
||||
export const putNdmCamera = async (stationCode: string, updateVO: NdmCameraUpdateVO) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.put<NdmCameraResultVO>(`${prefix}/api/ndm/ndmCamera`, updateVO);
|
||||
const [err, ndmCamera] = resp;
|
||||
if (err || !ndmCamera) {
|
||||
throw err;
|
||||
}
|
||||
return ndmCamera;
|
||||
};
|
||||
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;
|
||||
};
|
||||
22
src/apis/requests/device/video/ndm-keyboard.ts
Normal file
22
src/apis/requests/device/video/ndm-keyboard.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import type { PageParams, NdmKeyboardPageQuery, PageResult, NdmKeyboardResultVO, NdmKeyboardUpdateVO } from '@/apis/models';
|
||||
|
||||
export const postNdmKeyboardPage = async (stationCode: string, pageQuery: PageParams<NdmKeyboardPageQuery>) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.post<PageResult<NdmKeyboardResultVO>>(`${prefix}/api/ndm/ndmKeyboard/page`, pageQuery);
|
||||
const [err, ndmKeyboardData] = resp;
|
||||
if (err || !ndmKeyboardData) {
|
||||
throw err;
|
||||
}
|
||||
return ndmKeyboardData;
|
||||
};
|
||||
|
||||
export const putNdmKeyboard = async (stationCode: string, updateVO: NdmKeyboardUpdateVO) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.put<NdmKeyboardResultVO>(`${prefix}/api/ndm/ndmKeyboard`, updateVO);
|
||||
const [err, ndmKeyboard] = resp;
|
||||
if (err || !ndmKeyboard) {
|
||||
throw err;
|
||||
}
|
||||
return ndmKeyboard;
|
||||
};
|
||||
22
src/apis/requests/device/video/ndm-media-server.ts
Normal file
22
src/apis/requests/device/video/ndm-media-server.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import type { PageParams, NdmMediaServerPageQuery, PageResult, NdmMediaServerResultVO, NdmMediaServerUpdateVO } from '@/apis/models';
|
||||
|
||||
export const postNdmMediaServerPage = async (stationCode: string, pageQuery: PageParams<NdmMediaServerPageQuery>) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.post<PageResult<NdmMediaServerResultVO>>(`${prefix}/api/ndm/ndmMediaServer/page`, pageQuery);
|
||||
const [err, ndmMediaServerData] = resp;
|
||||
if (err || !ndmMediaServerData) {
|
||||
throw err;
|
||||
}
|
||||
return ndmMediaServerData;
|
||||
};
|
||||
|
||||
export const putNdmMediaServer = async (stationCode: string, updateVO: NdmMediaServerUpdateVO) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.put<NdmMediaServerResultVO>(`${prefix}/api/ndm/ndmMediaServer`, updateVO);
|
||||
const [err, ndmMediaServer] = resp;
|
||||
if (err || !ndmMediaServer) {
|
||||
throw err;
|
||||
}
|
||||
return ndmMediaServer;
|
||||
};
|
||||
22
src/apis/requests/device/video/ndm-video-server.ts
Normal file
22
src/apis/requests/device/video/ndm-video-server.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import type { PageParams, NdmVideoServerPageQuery, PageResult, NdmVideoServerResultVO, NdmVideoServerUpdateVO } from '@/apis/models';
|
||||
|
||||
export const postNdmVideoServerPage = async (stationCode: string, pageQuery: PageParams<NdmVideoServerPageQuery>) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.post<PageResult<NdmVideoServerResultVO>>(`${prefix}/api/ndm/ndmVideoServer/page`, pageQuery);
|
||||
const [err, ndmVideoServerData] = resp;
|
||||
if (err || !ndmVideoServerData) {
|
||||
throw err;
|
||||
}
|
||||
return ndmVideoServerData;
|
||||
};
|
||||
|
||||
export const putNdmVideoServer = async (stationCode: string, updateVO: NdmVideoServerUpdateVO) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.put<NdmVideoServerResultVO>(`${prefix}/api/ndm/ndmVideoServer`, updateVO);
|
||||
const [err, ndmVideoServer] = resp;
|
||||
if (err || !ndmVideoServer) {
|
||||
throw err;
|
||||
}
|
||||
return ndmVideoServer;
|
||||
};
|
||||
Reference in New Issue
Block a user