Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async getDatasets(options) {
const query = datasets.getDatasets
return new Promise((resolve, reject) => {
client.query({
query: query
})
.then(data => {
data = clone(data)
let datasets = data.data.datasets
if (options.isPublic) {
datasets = data.data.datasets.filter((dataset) => {
return dataset.public
})
}
data.data.datasets = datasets
resolve(data)
})
.catch(err => {