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]))
|
||||
}
|
||||
|
||||
async removeBackground(project: Pick<IProject, 'id'>) {
|
||||
async removeBackground(project: IProject) {
|
||||
const cancel = this.setLoading()
|
||||
|
||||
try {
|
||||
const response = await this.http.delete(`/projects/${project.id}/background`, project)
|
||||
return response.data
|
||||
await this.http.delete(`/projects/${project.id}/background`)
|
||||
return {
|
||||
...project,
|
||||
backgroundInformation: null,
|
||||
backgroundBlurHash: '',
|
||||
}
|
||||
} finally {
|
||||
cancel()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user