Add option to remove a list background
This commit is contained in:
parent
da9d511f87
commit
1686663a3f
3 changed files with 44 additions and 9 deletions
|
|
@ -56,4 +56,19 @@ export default class ListService extends AbstractService {
|
|||
return e
|
||||
})
|
||||
}
|
||||
|
||||
removeBackground(list) {
|
||||
const cancel = this.setLoading()
|
||||
|
||||
return this.http.delete(`/lists/${list.id}/background`, list)
|
||||
.then(response => {
|
||||
return Promise.resolve(response.data)
|
||||
})
|
||||
.catch(error => {
|
||||
return this.errorHandler(error)
|
||||
})
|
||||
.finally(() => {
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in a new issue