Saving working with states shown at manu item
This commit is contained in:
1 parent
308f564509
commit
8f478c5ca3
3 files changed
+40
-17
No files matched your search
@@ -88,7 +88,6 @@ function newWorkspace () {
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
console.log('Strategies Saved')
|
||||
resolve(true)
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -98,17 +97,11 @@ function newWorkspace () {
|
||||
})
|
||||
}
|
||||
|
||||
// To avoid race conditions, add asynchronous fetches to array
|
||||
let fetchDataPromises = []
|
||||
|
||||
fetchDataPromises.push(updateStrategies())
|
||||
|
||||
// When all asynchronous fetches resolve, authenticate user or throw error.
|
||||
await Promise.all(fetchDataPromises).then(result => {
|
||||
|
||||
}, err => {
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] saveToStrategyzer -> GraphQL Fetch Error -> err = ' + err.stack) }
|
||||
})
|
||||
await Promise.all(fetchDataPromises)
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] saveToStrategyzer -> err = ' + err.stack) }
|
||||
}
|
||||
@@ -257,7 +250,6 @@ function newWorkspace () {
|
||||
dataToSave.strategy.subStrategies.push(strategy)
|
||||
}
|
||||
|
||||
console.log(dataToSave)
|
||||
return dataToSave
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user