update uncategorized board totals when deleting and moving images

This commit is contained in:
chainchompa 2024-07-22 16:03:01 -04:00
parent d0435575c1
commit 339dddd018

View File

@ -104,6 +104,10 @@ export const imagesApi = api.injectEndpoints({
type: 'Board', type: 'Board',
id: boardId, id: boardId,
}, },
{
type: 'BoardImagesTotal',
id: boardId,
},
]; ];
}, },
}), }),
@ -136,6 +140,10 @@ export const imagesApi = api.injectEndpoints({
type: 'Board', type: 'Board',
id: boardId, id: boardId,
}, },
{
type: 'BoardImagesTotal',
id: boardId,
},
]; ];
return tags; return tags;
@ -169,6 +177,10 @@ export const imagesApi = api.injectEndpoints({
type: 'Board', type: 'Board',
id: boardId, id: boardId,
}, },
{
type: 'BoardImagesTotal',
id: boardId,
},
]; ];
}, },
}), }),
@ -300,6 +312,10 @@ export const imagesApi = api.injectEndpoints({
type: 'Board', type: 'Board',
id: boardId, id: boardId,
}, },
{
type: 'BoardImagesTotal',
id: boardId,
},
]; ];
}, },
}), }),
@ -362,6 +378,10 @@ export const imagesApi = api.injectEndpoints({
}, },
{ type: 'Board', id: board_id }, { type: 'Board', id: board_id },
{ type: 'Board', id: imageDTO.board_id ?? 'none' }, { type: 'Board', id: imageDTO.board_id ?? 'none' },
{
type: 'BoardImagesTotal',
id: imageDTO.board_id ?? 'none',
},
]; ];
}, },
}), }),
@ -393,6 +413,10 @@ export const imagesApi = api.injectEndpoints({
}, },
{ type: 'Board', id: imageDTO.board_id ?? 'none' }, { type: 'Board', id: imageDTO.board_id ?? 'none' },
{ type: 'Board', id: 'none' }, { type: 'Board', id: 'none' },
{
type: 'BoardImagesTotal',
id: imageDTO.board_id ?? 'none',
},
]; ];
}, },
}), }),
@ -434,6 +458,10 @@ export const imagesApi = api.injectEndpoints({
tags.push({ type: 'Image', id: imageDTO.image_name }); tags.push({ type: 'Image', id: imageDTO.image_name });
} }
tags.push({ type: 'Board', id: board_id }); tags.push({ type: 'Board', id: board_id });
tags.push({
type: 'BoardImagesTotal',
id: board_id ?? 'none',
});
return tags; return tags;
}, },
}), }),
@ -480,6 +508,10 @@ export const imagesApi = api.injectEndpoints({
} }
tags.push({ type: 'Image', id: image_name }); tags.push({ type: 'Image', id: image_name });
tags.push({ type: 'Board', id: board_id }); tags.push({ type: 'Board', id: board_id });
tags.push({
type: 'BoardImagesTotal',
id: board_id ?? 'none',
});
}); });
return tags; return tags;