refactor: use UPSERT for consistency in document upload

This commit is contained in:
Tanmay Deep Sharma
2025-07-02 19:58:34 +05:30
parent 8f27ba081c
commit 235ce3479c
4 changed files with 16 additions and 13 deletions
@@ -59,8 +59,8 @@ const handleCreateDialogClose = () => {
};
const handleCreateDialogSuccess = () => {
// Refresh the documents list after successful creation
fetchDocuments();
// Document is already added to the store optimistically, no need to refetch
// The store action 'uploadPdf' or 'create' already adds the document via commit(mutationTypes.ADD)
};
const handleAction = ({ action, id }) => {