Skip to content
Snippets Groups Projects
Commit 59d6a2c9 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

chore: make updateShow action error friendly

parent 64d8ec3a
No related branches found
No related tags found
No related merge requests found
...@@ -339,17 +339,13 @@ const actions = { ...@@ -339,17 +339,13 @@ const actions = {
updateShow(ctx, data) { updateShow(ctx, data) {
const uri = createSteeringURL('shows', data.id) const uri = createSteeringURL('shows', data.id)
axios return axios
.put(uri, data.show) .put(uri, data.show)
.then((response) => { .then((response) => {
if (data && typeof data.callback === 'function') { return callOrReturn(response, data?.callback)
data.callback(response)
}
}) })
.catch((error) => { .catch((error) => {
if (data && typeof data.callbackCancel === 'function') { APIError.handle(error, 'Unable to update show', data, this)
data.callbackCancel(error.response)
}
}) })
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment