fix(project): do not remove project from navigation after removing background image
This commit is contained in:
parent
fa628edc0c
commit
31e502d711
@ -52,12 +52,16 @@ export default class ProjectService extends AbstractService<IProject> {
|
|||||||
return window.URL.createObjectURL(new Blob([response.data]))
|
return window.URL.createObjectURL(new Blob([response.data]))
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeBackground(project: Pick<IProject, 'id'>) {
|
async removeBackground(project: IProject) {
|
||||||
const cancel = this.setLoading()
|
const cancel = this.setLoading()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await this.http.delete(`/projects/${project.id}/background`, project)
|
await this.http.delete(`/projects/${project.id}/background`)
|
||||||
return response.data
|
return {
|
||||||
|
...project,
|
||||||
|
backgroundInformation: null,
|
||||||
|
backgroundBlurHash: '',
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
cancel()
|
cancel()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user