1
0

Add option to remove a list background

This commit is contained in:
kolaente
2021-03-21 18:11:24 +01:00
parent da9d511f87
commit 1686663a3f
3 changed files with 44 additions and 9 deletions

View File

@ -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()
})
}
}