chore: reorder import
This commit is contained in:
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;
|
||||
};
|
||||
Reference in New Issue
Block a user