u
This commit is contained in:
@@ -122,7 +122,8 @@ const actions = {
|
||||
// #region delPic
|
||||
async deleteImage(id) {
|
||||
const res = await brandApi.deleteImage(id);
|
||||
await brandAutomat.actions.load(true);
|
||||
const updated = res.brand ?? { pics: [] };
|
||||
updateStateWithBrands(brandAutomat.state.brands.map((b) => (b.id === id ? { ...b, ...updated, pics: [] } : b)));
|
||||
return res.brand;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user