Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const createAlertCheckFromFile = async(userName, filepath) => {
let user = getUser(userName);
let content = await readFileToBuffer(process.cwd() + '/' + filepath);
let newCheck = JSON.parse(content);
newCheck.orgID = user.orgid;
let chkAPI = new ChecksAPI(new InfluxDB({url: __config.influx_url, token: user.token, timeout: 20000}));
chkAPI.createCheck({body: newCheck});
};