Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function list (params) {
const { alias } = params.options;
const { app_id: appId } = await AppConfig.getAppData(alias).toPromise();
const drains = await getDrains({ appId }).then(sendToApi);
drains.forEach((drain) => {
const { id, state, target: { url, drainType } } = drain;
Logger.println(`${id} -> ${state} for ${url} as ${drainType}`);
});
}