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