Fixed a bug where a task would not update after marking it as done
This commit is contained in:
parent
f7080cf819
commit
b12496c983
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@
|
||||||
|
|
||||||
HTTP.post(`tasks/` + e.target.id, {done: e.target.checked}, {headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}})
|
HTTP.post(`tasks/` + e.target.id, {done: e.target.checked}, {headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.updateTaskByID(e.target.id, response.data)
|
this.updateTaskByID(parseInt(e.target.id), response.data)
|
||||||
this.handleSuccess({message: 'The task was successfully ' + (e.target.checked ? 'un-' :'') + 'marked as done.'})
|
this.handleSuccess({message: 'The task was successfully ' + (e.target.checked ? 'un-' :'') + 'marked as done.'})
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
Loading…
Reference in a new issue