react-native-code-sync
Version:
React-native plugin for the code-sync functionality on live via OTA (Over-the-air)
25 lines (22 loc) • 617 B
JavaScript
import { getCodeSyncConfig } from '../config';
import { Utility } from '../utils';
// import OtaApiConstant from './OtaApiConstant.json';
import { OTAApi } from './OtaService'
const checkForOTAUpdate = (data) => {
try {
const config = getCodeSyncConfig();
return OTAApi(
{
method: 'POST',
url: config.checkForUpdateEndPoint,
data
}
);
} catch (error) {
Utility.showAPIError(error)
Utility.log('api error=> checkForUpdateEndPoint', JSON.stringify(error))
}
}
export {
checkForOTAUpdate
}