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 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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user