fix: /syncCamera

This commit is contained in:
yangsy
2025-12-01 14:43:42 +08:00
parent f7d1d2d44c
commit b0c0b88091

View File

@@ -55,9 +55,10 @@ export const syncCameraApi = async (options?: { stationCode?: string; signal?: A
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCamera/syncCamera`;
const resp = await client.get<void>(endpoint, { signal });
const [err] = resp;
if (err) {
const resp = await client.get<boolean>(endpoint, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};