Files
ndm-web-platform/src/pages/vimp/apis/request/client.catalog.channel.ts
T
yangsy 9f127d2927 重构(vimp): 重命名VIMP API文件并更新调用处
将原有的catalog.channel和catalog.all-device API文件重命名为带client前缀的新文件,新增对应API实现模块,修复all-device接口函数名的拼写错误,并更新use-channels-query组合式函数中的API调用逻辑
2026-06-16 10:32:32 +08:00

12 lines
468 B
TypeScript

import { unwrapVimpResponse, vimpClient } from '../client';
import type { VimpChannel } from '../model';
export const clientCatalogChannelApi = async (code: string, options?: { signal?: AbortSignal }) => {
const { signal } = options ?? {};
const client = vimpClient;
const endpoint = `/client/catalog/channel`;
const resp = await client.post<VimpChannel[]>(endpoint, { code, time: '' }, { signal });
const data = unwrapVimpResponse(resp);
return data;
};