Fixed a bug where a task would not update after marking it as done

This commit is contained in:
kolaente 2018-09-11 07:10:32 +02:00
parent f7080cf819
commit b12496c983
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -171,7 +171,7 @@
HTTP.post(`tasks/` + e.target.id, {done: e.target.checked}, {headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}})
.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.'})
})
.catch(e => {