Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const setUserOrgId = async(user) => {
//now grab the first org
let orgsAPI = new OrgsAPI(new InfluxDB({url: __config.influx_url, token: user.token, timeout: 20000}));
let orgs = await orgsAPI.getOrgs();
user.orgid = orgs.orgs[0].id;
};