Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updatePublic(datasetId, publicFlag) {
console.log('calling updatePublic mutation with id:', datasetId, 'and publicFlag:', publicFlag)
const mutation = datasets.updatePublic
return new Promise((resolve, reject) => {
client.mutate({
mutation: mutation,
variables: {
id: bids.decodeId(datasetId),
publicFlag: publicFlag
}
})
.then(data => {
console.log('response from updatePublic:', data)
resolve(data)
})
.catch(err => {
console.log(err)
reject(err)
})