Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return prompts(deleteQuestions).then(({ del }) => {
if (del) {
console.log(chalk.red.bold(`Deleting ${item.title}`));
return removeItem({
id: item.id,
authentication: session
}).then(() => {
return Promise.resolve({ done: false, deleted: del, item });
});
}
return Promise.resolve({ done: false, deleted: del, item });
});
}
public deleteItem(id : string){
return removeItem({
id: id,
authentication: this.authentication,
portal: this.restURL,
});
}