This commit is contained in:
seb
2026-10-11 02:54:44 +02:00
parent 240a5dd3d7
commit 3032299257

View File

@@ -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;
}
};