Commit 1362267d authored by Fatih Acet's avatar Fatih Acet

Fix data coming down to error handler of tasklist

parent 83306d24
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import createFlash from '~/flash';
import animateMixin from '../mixins/animate'; import animateMixin from '../mixins/animate';
import TaskList from '../../task_list'; import TaskList from '../../task_list';
import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor'; import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
...@@ -89,7 +90,7 @@ export default { ...@@ -89,7 +90,7 @@ export default {
}, },
taskListUpdateError(data) { taskListUpdateError(data) {
// stub for error handling createFlash(data.errors[0]);
}, },
updateTaskStatusText() { updateTaskStatusText() {
......
...@@ -44,12 +44,12 @@ export default class TaskList { ...@@ -44,12 +44,12 @@ export default class TaskList {
const patchData = {}; const patchData = {};
patchData[this.dataType] = { patchData[this.dataType] = {
[this.fieldName]: $target.val(), [this.fieldName]: $target.val(),
['lock_version']: this.lockVersion, lock_version: this.lockVersion,
}; };
return axios return axios
.patch($target.data('updateUrl') || $('form.js-issuable-update').attr('action'), patchData) .patch($target.data('updateUrl') || $('form.js-issuable-update').attr('action'), patchData)
.then(({ data }) => this.onSuccess(data)) .then(({ data }) => this.onSuccess(data))
.catch(err => this.onError(err)); .catch(({ response }) => this.onError(response.data));
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment