Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractal.js
Commits
27ce145a
Commit
27ce145a
authored
Aug 29, 2017
by
Sascha Herzinger
Browse files
fixed reload
parent
068ca7c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/services/request-manager.js
View file @
27ce145a
...
...
@@ -44,8 +44,8 @@ export default class {
* @returns {AxiosPromise} An ES6 promise.
*/
async
reloadData
({
taskID
})
{
const
dataItem
=
store
.
getters
.
data
.
find
(
d
=>
d
.
task_id
===
taskID
)
const
descriptors
=
[
dataItem
.
descriptor
]
const
metaData
=
await
this
.
getMetaData
({
taskID
}
)
const
descriptors
=
[
metaData
.
data
.
meta
[
'
descriptor
'
]
]
await
this
.
deleteData
({
taskID
})
return
this
.
createData
({
descriptors
})
}
...
...
@@ -58,6 +58,15 @@ export default class {
return
this
.
_axios
.
get
(
'
/data
'
)
}
/**
* Submits a GET request that will return meta information for the data associated with the given task id.
* @param data task id to get meta information for.
* @returns {AxiosPromise} An ES6 promise.
*/
getMetaData
({
taskID
})
{
return
this
.
_axios
.
get
(
`/data/meta/
${
taskID
}
?wait=1`
)
}
/**
* Submits a DELETE request that will remove data from the back end if the current session has access to it.
* @param taskID The id of the data to be removed.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment