chore: apis

This commit is contained in:
yangsy
2025-09-02 23:17:52 +08:00
parent f48b5813f9
commit ced07b17ff
2 changed files with 23 additions and 0 deletions

View File

@@ -35,3 +35,16 @@ export const turnStatus = async (stationCode: string, ipAddress: string, circuit
}
return result;
};
export const rebootSecurityBox = async (stationCode: string, ipAddress: string) => {
const prefix = stationCode ? `/${stationCode}` : '';
const resp = await ndmClient.post<boolean>(`${prefix}/api/ndm/ndmSecurityBox/reboot`, {
community: 'public',
ipAddress,
});
const [err, result] = resp;
if (err || !result) {
throw err;
}
return result;
};

View File

@@ -64,3 +64,13 @@ export const reloadRecordCheckByGbId = async (stationCode: string, channel: Clie
}
return result;
};
export const reloadAllRecordCheck = async (stationCode: string, dayOffset: number) => {
const prefix = stationCode ? `/${stationCode}` : '';
const resp = await ndmClient.post<boolean>(`${prefix}/api/ndm/ndmRecordCheck/reloadAllRecordCheck`, dayOffset);
const [err, result] = resp;
if (err || !result) {
throw err;
}
return result;
};